Remove org.jetbrains.annotations dependency 30/125430/3
authorBruno Sakoto <bruno.sakoto@bell.ca>
Thu, 28 Oct 2021 09:23:31 +0000 (11:23 +0200)
committerBruno Sakoto <bruno.sakoto@bell.ca>
Thu, 28 Oct 2021 12:59:03 +0000 (12:59 +0000)
It is not part of spring boot 2.5.5 anymore
and using it to enforce code invariant is not consistent
in the overall code base.

Issue-ID: CPS-582
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
Change-Id: I6b2c1b8340cda376b70daa2ac092b3d02daa8960

cps-ncmp-service/pom.xml
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/operation/DmiOperations.java
cps-ri/pom.xml
cps-ri/src/main/java/org/onap/cps/spi/repository/FragmentRepositoryCpsPathQueryImpl.java

index e82c95e..b702793 100644 (file)
@@ -66,9 +66,5 @@
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-validation</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.jetbrains</groupId>
-            <artifactId>annotations</artifactId>
-        </dependency>
     </dependencies>
 </project>
index f7421cd..562c330 100644 (file)
@@ -22,7 +22,6 @@ package org.onap.cps.ncmp.api.impl.operation;
 
 import com.fasterxml.jackson.annotation.JsonValue;
 import lombok.Getter;
-import org.jetbrains.annotations.NotNull;
 import org.onap.cps.ncmp.api.impl.client.DmiRestClient;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.ResponseEntity;
@@ -165,7 +164,6 @@ public class DmiOperations {
         return dmiRestClient.postOperationWithJsonData(stringBuilder.toString(), jsonBody, new HttpHeaders());
     }
 
-    @NotNull
     private String getDmiResourceUrl(final String dmiServiceName,
                                      final String cmHandle,
                                      final String resourceName) {
@@ -176,7 +174,6 @@ public class DmiOperations {
         return stringBuilder.toString();
     }
 
-    @NotNull
     private String getDmiDatastoreUrl(final String dmiServiceName,
                                       final String cmHandle,
                                       final String resourceId,
@@ -188,7 +185,6 @@ public class DmiOperations {
         return stringBuilder.toString();
     }
 
-    @NotNull
     private StringBuilder getStringBuilderForPassThroughUrl(final String dmiServiceName,
                                                             final String cmHandle,
                                                             final String resourceId,
index b7aa419..8d860b0 100644 (file)
             <groupId>com.fasterxml.jackson.core</groupId>\r
             <artifactId>jackson-databind</artifactId>\r
         </dependency>\r
-        <dependency>\r
-            <groupId>org.jetbrains</groupId>\r
-            <artifactId>annotations</artifactId>\r
-        </dependency>\r
         <!-- T E S T   D E P E N D E N C I E S -->\r
         <dependency>\r
             <groupId>org.codehaus.groovy</groupId>\r
index 4aa3e5f..fddedca 100644 (file)
@@ -28,8 +28,6 @@ import java.util.Map;
 import javax.persistence.EntityManager;
 import javax.persistence.PersistenceContext;
 import javax.persistence.Query;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
 import org.onap.cps.cpspath.parser.CpsPathPrefixType;
 import org.onap.cps.cpspath.parser.CpsPathQuery;
 import org.onap.cps.spi.entities.FragmentEntity;
@@ -63,7 +61,6 @@ public class FragmentRepositoryCpsPathQueryImpl implements FragmentRepositoryCps
         return query.getResultList();
     }
 
-    @NotNull
     private static String getSimilarToXpathSqlRegex(final CpsPathQuery cpsPathQuery) {
         final var xpathRegexBuilder = new StringBuilder();
         if (CpsPathPrefixType.ABSOLUTE.equals(cpsPathQuery.getCpsPathPrefixType())) {
@@ -76,13 +73,11 @@ public class FragmentRepositoryCpsPathQueryImpl implements FragmentRepositoryCps
         return xpathRegexBuilder.toString();
     }
 
-    @NotNull
     private static String escapeXpath(final String xpath) {
         // See https://jira.onap.org/browse/CPS-500 for limitations of this basic escape mechanism
         return xpath.replace("[@", "\\[@");
     }
 
-    @Nullable
     private static Integer getTextValueAsInt(final CpsPathQuery cpsPathQuery) {
         try {
             return Integer.parseInt(cpsPathQuery.getTextFunctionConditionValue());