[AAI-2528] | Update to spring-boot 2.1.6.RELEASE 44/101744/3
authorSneha Dantkale <Sneha.dantkale@amdocs.com>
Fri, 14 Feb 2020 13:45:02 +0000 (19:15 +0530)
committerForsyth, James (jf2512) <jf2512@att.com>
Fri, 14 Feb 2020 22:05:45 +0000 (17:05 -0500)
Issue-ID: AAI-2528

Change-Id: I87756450c12538af3f21e4affa24ef76724d232c

Signed-off-by: Sneha Dantkale <Sneha.dantkale@amdocs.com>
Change-Id: I9437899ba1c7f2aec816a8076c954b080f9512fb

Signed-off-by: Sneha Dantkale <Sneha.dantkale@amdocs.com>
Change-Id: If3ad26f98c815e4872320b2652cf6c2e0b675de0
Signed-off-by: Sneha Dantkale <Sneha.dantkale@amdocs.com>
19 files changed:
aai-annotations/pom.xml
aai-auth/pom.xml
aai-common-docker/pom.xml
aai-core/pom.xml
aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java
aai-core/src/test/java/org/onap/aai/serialization/queryformats/QueryFormatTestHelper.java
aai-core/src/test/java/org/onap/aai/util/FileWatcherTest.java
aai-parent/pom.xml
aai-rest/pom.xml
aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java
aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java
aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java
aai-schema-abstraction/pom.xml
aai-schema-ingest/pom.xml
aai-schema-ingest/src/main/java/org/onap/aai/config/SchemaServiceConfiguration.java
aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java
aai-utils/pom.xml
pom.xml
version.properties

index b2fc5c4..89af6bf 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.5-SNAPSHOT</version>
+        <version>1.6.6-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
     <artifactId>aai-annotations</artifactId>
index ac1f062..982b79a 100644 (file)
@@ -27,7 +27,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.5-SNAPSHOT</version>
+        <version>1.6.6-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
     <artifactId>aai-auth</artifactId>
index 61f8f0e..f432487 100644 (file)
@@ -26,7 +26,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.5-SNAPSHOT</version>
+        <version>1.6.6-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
 
index 319af50..ec4e7e3 100644 (file)
@@ -28,7 +28,7 @@ limitations under the License.
        <parent>
                <groupId>org.onap.aai.aai-common</groupId>
                <artifactId>aai-parent</artifactId>
-               <version>1.6.5-SNAPSHOT</version>
+               <version>1.6.6-SNAPSHOT</version>
                <relativePath>../aai-parent/pom.xml</relativePath>
        </parent>
        <artifactId>aai-core</artifactId>
@@ -37,14 +37,9 @@ limitations under the License.
        <properties>
                <springframework.version>4.3.24.RELEASE</springframework.version>
 
-               <!-- <httpclient.version>4.5.5</httpclient.version> <jackson.version>2.2.3</jackson.version> 
-                       <eelf.core.version>1.0.1-oss</eelf.core.version> <logback.version>1.2.3</logback.version> 
-                       <freemarker.version>2.3.21</freemarker.version> -->
-
                <jacoco.line.coverage.limit>0.50</jacoco.line.coverage.limit>
                <gremlin.version>3.2.2</gremlin.version>
                <groovy.version>2.4.15</groovy.version> 
-               <!--    <jetty.version>9.4.11.v20180605</jetty.version> -->
                <!-- Start of Default ONAP Schema Properties -->
                <aai.wiki.link>https://wiki.onap.org/</aai.wiki.link>
                <gendoc.version>v15</gendoc.version>
@@ -136,6 +131,12 @@ limitations under the License.
                <dependency>
                        <groupId>com.att.eelf</groupId>
                        <artifactId>eelf-core</artifactId>
+                       <exclusions><!-- excluding transitive dependency coming from this artifact, as we would need powermock-api-mockito2-->
+                               <exclusion>
+                                       <groupId>org.powermock</groupId>
+                                       <artifactId>powermock-api-mockito</artifactId>
+                               </exclusion>
+            </exclusions>
                </dependency>
                <dependency>
                        <groupId>org.codehaus.jackson</groupId>
@@ -172,9 +173,14 @@ limitations under the License.
                </dependency>
                <dependency>
                        <groupId>org.powermock</groupId>
-                       <artifactId>powermock-api-mockito</artifactId>
+                       <artifactId>powermock-api-mockito2</artifactId>
                        <scope>test</scope>
                </dependency>
+                       <dependency>
+                       <groupId>org.powermock</groupId>
+                       <artifactId>powermock-core</artifactId>
+                       <scope>test</scope>
+               </dependency>
                <dependency>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
index a757d3d..c3211fb 100644 (file)
@@ -47,26 +47,22 @@ public class URITools {
         MultivaluedMap<String, String> result = new MultivaluedHashMap<>();
         String queryParams = uri.getRawQuery();
         if (queryParams != null) {
-            try {
-                String[] sections = queryParams.split("&");
-                String[] query = null;
-                String key, value = "";
-                for (String section : sections) {
-                    query = section.split("=");
-                    key = UriUtils.decode(query[0], "UTF-8");
-                    if (query[1] != null) {
-                        query[1] = query[1].replaceAll("\\+", "%20");
-                    }
-                    value = UriUtils.decode(query[1], "UTF-8");
-                    if (result.containsKey(key)) {
-                        result.add(key, value);
-                    } else {
-                        result.putSingle(key, value);
-                    }
+           String[] sections = queryParams.split("&");
+           String[] query = null;
+           String key, value = "";
+           for (String section : sections) {
+                query = section.split("=");
+                key = UriUtils.decode(query[0], "UTF-8");
+                if (query[1] != null) {
+                    query[1] = query[1].replaceAll("\\+", "%20");
                 }
-            } catch (UnsupportedEncodingException e) {
-
-            }
+                value = UriUtils.decode(query[1], "UTF-8");
+                if (result.containsKey(key)) {
+                    result.add(key, value);
+                } else {
+                    result.putSingle(key, value);
+                }
+           }
         }
         return result;
 
index f05e36d..03990b1 100644 (file)
@@ -46,7 +46,7 @@ public class QueryFormatTestHelper {
     public static void mockPathed(UrlBuilder mock) throws AAIFormatVertexException {
         Answer<String> answer = new Answer<String>() {
             public String answer(InvocationOnMock invocation) throws Throwable {
-                Vertex v = invocation.getArgumentAt(0, Vertex.class);
+                Vertex v = invocation.getArgument(0);
 
                 return v.<String>property(AAIProperties.AAI_URI).orElse("urimissing");
             }
index f483830..2e870f6 100644 (file)
@@ -70,8 +70,10 @@ public class FileWatcherTest {
     public void testOnChange() throws Exception {
         FileWatcher fileWatcher = Mockito.mock(FileWatcher.class, Mockito.CALLS_REAL_METHODS);
 
-        fileWatcher.onChange(Mockito.any(File.class));
+        File file=Mockito.mock(File.class);
+        fileWatcher.onChange(file);
+
+        Mockito.verify(fileWatcher).onChange(file);
 
-        Mockito.verify(fileWatcher).onChange(Mockito.any(File.class));
     }
 }
index 5969d7e..1356548 100644 (file)
@@ -27,7 +27,7 @@ limitations under the License.
        <parent>
                <groupId>org.onap.aai.aai-common</groupId>
                <artifactId>aai-common</artifactId>
-               <version>1.6.5-SNAPSHOT</version>
+               <version>1.6.6-SNAPSHOT</version>
        </parent>
        <artifactId>aai-parent</artifactId>
        <name>aai-parent</name>
@@ -96,6 +96,7 @@ limitations under the License.
                <plexus.utils.version>3.1.1</plexus.utils.version>
                <reflections.version>0.9.10</reflections.version>
                <snakeyaml.version>1.25</snakeyaml.version>
+
                <spring.boot.version>1.5.22.RELEASE</spring.boot.version>
 
                <sonar.jacoco.reportPath />
@@ -104,6 +105,7 @@ limitations under the License.
                
                <!-- we let things pass by default, set custom level for each child project -->
                <jacoco.line.coverage.limit>0.00</jacoco.line.coverage.limit>
+
                <jacoco.version>0.8.5</jacoco.version>
                <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
                <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
@@ -116,11 +118,29 @@ limitations under the License.
                <spring.jms.version>4.3.25.RELEASE</spring.jms.version>
                <spring.test.version>4.3.25.RELEASE</spring.test.version>
                <spring.security.rsa.version>1.0.8.RELEASE</spring.security.rsa.version>
+               <json.simple.version>1.1.1</json.simple.version>
+               <powermock.api.mockito2.version>2.0.4</powermock.api.mockito2.version>
 
        </properties>
+
+       <profiles>
+         <profile>
+           <id>spring-boot-2-1</id>
+           <properties>
+             <spring.boot.version>2.1.6.RELEASE</spring.boot.version>
+           </properties>
+         </profile>
+       </profiles>
+
        <dependencyManagement>
                <dependencies>
 
+                       <dependency>
+                               <groupId>com.googlecode.json-simple</groupId>
+                               <artifactId>json-simple</artifactId>
+                               <version>${json.simple.version}</version>
+                       </dependency>
+
                        <dependency>
                                <groupId>org.onap.aai.aai-common</groupId>
                                <artifactId>aai-schema-ingest</artifactId>
@@ -336,8 +356,13 @@ limitations under the License.
 
                        <dependency>
                                <groupId>org.powermock</groupId>
-                               <artifactId>powermock-api-mockito</artifactId>
-                               <version>${powermock.version}</version>
+                               <artifactId>powermock-api-mockito2</artifactId>
+                               <version>${powermock.api.mockito2.version}</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.powermock</groupId>
+                               <artifactId>powermock-core</artifactId>
+                               <version>${powermock.api.mockito2.version}</version>
                        </dependency>
                        <dependency>
                                <groupId>org.powermock</groupId>
index d2716c0..91fc7e4 100644 (file)
@@ -29,7 +29,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.5-SNAPSHOT</version>
+        <version>1.6.6-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
     <artifactId>aai-rest</artifactId>
index b5a0101..31dd0c9 100644 (file)
@@ -41,7 +41,7 @@ public abstract class NoAuthRestClient extends RestClient {
     public void init() throws Exception {
         HttpClient client = HttpClients.createDefault();
         restTemplate =
-                new RestTemplateBuilder().requestFactory(new HttpComponentsClientHttpRequestFactory(client)).build();
+            new RestTemplateBuilder().requestFactory(() -> new HttpComponentsClientHttpRequestFactory(client)).build();
 
         restTemplate.setErrorHandler(new RestClientResponseErrorHandler());
     }
index 30545db..aa67257 100644 (file)
@@ -59,7 +59,7 @@ public abstract class OneWaySSLRestClient extends RestClient {
                 HttpClients.custom().setSSLContext(sslContext).setSSLHostnameVerifier((s, sslSession) -> true).build();
 
         restTemplate =
-                new RestTemplateBuilder().requestFactory(new HttpComponentsClientHttpRequestFactory(client)).build();
+            new RestTemplateBuilder().requestFactory(() -> new HttpComponentsClientHttpRequestFactory(client)).build();
 
         restTemplate.setErrorHandler(new RestClientResponseErrorHandler());
 
index a69977f..58f2106 100644 (file)
@@ -62,7 +62,7 @@ public abstract class TwoWaySSLRestClient extends RestClient {
                 HttpClients.custom().setSSLContext(sslContext).setSSLHostnameVerifier((s, sslSession) -> true).build();
 
         restTemplate =
-                new RestTemplateBuilder().requestFactory(new HttpComponentsClientHttpRequestFactory(client)).build();
+            new RestTemplateBuilder().requestFactory(() -> new HttpComponentsClientHttpRequestFactory(client)).build();
 
         restTemplate.setErrorHandler(new RestClientResponseErrorHandler());
 
index 581a36b..4f216fc 100644 (file)
@@ -28,7 +28,7 @@
   <parent>
     <groupId>org.onap.aai.aai-common</groupId>
     <artifactId>aai-parent</artifactId>
-    <version>1.6.5-SNAPSHOT</version>
+    <version>1.6.6-SNAPSHOT</version>
     <relativePath>../aai-parent/pom.xml</relativePath>
   </parent>
   
index d5e20ea..1717ad4 100644 (file)
@@ -15,7 +15,7 @@
        <parent>
                <groupId>org.onap.aai.aai-common</groupId>
                <artifactId>aai-parent</artifactId>
-               <version>1.6.5-SNAPSHOT</version>
+               <version>1.6.6-SNAPSHOT</version>
                <relativePath>../aai-parent/pom.xml</relativePath>
        </parent>
        <artifactId>aai-schema-ingest</artifactId>
index cdd8749..245dce9 100644 (file)
@@ -44,7 +44,7 @@ public class SchemaServiceConfiguration {
         return schemaVersionsBean().getSchemaVersions();
     }
 
-    @Bean(name = "schemaVersions")
+    @Bean(name = "schemaVersions2")
     public SchemaVersions schemaVersions() {
         return schemaServiceVersions();
     }
index af94765..b768847 100644 (file)
@@ -27,10 +27,12 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.TestPropertySource;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 @RunWith(SpringJUnit4ClassRunner.class)
 @ContextConfiguration(locations = {"classpath:forWiringTests/testUsingPropFileContext.xml"})
+@TestPropertySource(locations="classpath:forWiringTests/schema-ingest-for-xml-test.properties")
 public class SchemaLocationsBeanXMLSetterWithPropFileTest {
     @Autowired
     SchemaLocationsBean bean;
index 1930e98..91f507c 100644 (file)
@@ -29,7 +29,7 @@
     <parent>
         <groupId>org.onap.aai.aai-common</groupId>
         <artifactId>aai-parent</artifactId>
-        <version>1.6.5-SNAPSHOT</version>
+        <version>1.6.6-SNAPSHOT</version>
         <relativePath>../aai-parent/pom.xml</relativePath>
     </parent>
     <artifactId>aai-utils</artifactId>
diff --git a/pom.xml b/pom.xml
index 9253a49..9b3fe4a 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@
 
     <groupId>org.onap.aai.aai-common</groupId>
     <artifactId>aai-common</artifactId>
-    <version>1.6.5-SNAPSHOT</version>
+    <version>1.6.6-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>aai-aai-common</name>
     <description>Contains all of the common code for resources and traversal repos</description>
index 716f7d4..16fa561 100644 (file)
@@ -5,7 +5,7 @@
 
 major_version=1
 minor_version=6
-patch_version=5
+patch_version=6
 
 base_version=${major_version}.${minor_version}.${patch_version}