From 48960e6033145667366bbcd2f8ad1ae44c2fd260 Mon Sep 17 00:00:00 2001 From: Sneha Dantkale Date: Fri, 14 Feb 2020 19:15:02 +0530 Subject: [PATCH] [AAI-2528] | Update to spring-boot 2.1.6.RELEASE Issue-ID: AAI-2528 Change-Id: I87756450c12538af3f21e4affa24ef76724d232c Signed-off-by: Sneha Dantkale Change-Id: I9437899ba1c7f2aec816a8076c954b080f9512fb Signed-off-by: Sneha Dantkale Change-Id: If3ad26f98c815e4872320b2652cf6c2e0b675de0 Signed-off-by: Sneha Dantkale --- aai-annotations/pom.xml | 2 +- aai-auth/pom.xml | 2 +- aai-common-docker/pom.xml | 2 +- aai-core/pom.xml | 20 ++++++++----- .../java/org/onap/aai/restcore/util/URITools.java | 34 ++++++++++------------ .../queryformats/QueryFormatTestHelper.java | 2 +- .../java/org/onap/aai/util/FileWatcherTest.java | 6 ++-- aai-parent/pom.xml | 31 ++++++++++++++++++-- aai-rest/pom.xml | 2 +- .../org/onap/aai/restclient/NoAuthRestClient.java | 2 +- .../onap/aai/restclient/OneWaySSLRestClient.java | 2 +- .../onap/aai/restclient/TwoWaySSLRestClient.java | 2 +- aai-schema-abstraction/pom.xml | 2 +- aai-schema-ingest/pom.xml | 2 +- .../aai/config/SchemaServiceConfiguration.java | 2 +- ...hemaLocationsBeanXMLSetterWithPropFileTest.java | 2 ++ aai-utils/pom.xml | 2 +- pom.xml | 2 +- version.properties | 2 +- 19 files changed, 76 insertions(+), 45 deletions(-) diff --git a/aai-annotations/pom.xml b/aai-annotations/pom.xml index b2fc5c46..89af6bf9 100644 --- a/aai-annotations/pom.xml +++ b/aai-annotations/pom.xml @@ -27,7 +27,7 @@ org.onap.aai.aai-common aai-parent - 1.6.5-SNAPSHOT + 1.6.6-SNAPSHOT ../aai-parent/pom.xml aai-annotations diff --git a/aai-auth/pom.xml b/aai-auth/pom.xml index ac1f0623..982b79af 100644 --- a/aai-auth/pom.xml +++ b/aai-auth/pom.xml @@ -27,7 +27,7 @@ org.onap.aai.aai-common aai-parent - 1.6.5-SNAPSHOT + 1.6.6-SNAPSHOT ../aai-parent/pom.xml aai-auth diff --git a/aai-common-docker/pom.xml b/aai-common-docker/pom.xml index 61f8f0e1..f4324871 100644 --- a/aai-common-docker/pom.xml +++ b/aai-common-docker/pom.xml @@ -26,7 +26,7 @@ org.onap.aai.aai-common aai-parent - 1.6.5-SNAPSHOT + 1.6.6-SNAPSHOT ../aai-parent/pom.xml diff --git a/aai-core/pom.xml b/aai-core/pom.xml index 319af50a..ec4e7e38 100644 --- a/aai-core/pom.xml +++ b/aai-core/pom.xml @@ -28,7 +28,7 @@ limitations under the License. org.onap.aai.aai-common aai-parent - 1.6.5-SNAPSHOT + 1.6.6-SNAPSHOT ../aai-parent/pom.xml aai-core @@ -37,14 +37,9 @@ limitations under the License. 4.3.24.RELEASE - - 0.50 3.2.2 2.4.15 - https://wiki.onap.org/ v15 @@ -136,6 +131,12 @@ limitations under the License. com.att.eelf eelf-core + + + org.powermock + powermock-api-mockito + + org.codehaus.jackson @@ -172,9 +173,14 @@ limitations under the License. org.powermock - powermock-api-mockito + powermock-api-mockito2 test + + org.powermock + powermock-core + test + com.google.guava guava diff --git a/aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java b/aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java index a757d3db..c3211fbe 100644 --- a/aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java +++ b/aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java @@ -47,26 +47,22 @@ public class URITools { MultivaluedMap 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; diff --git a/aai-core/src/test/java/org/onap/aai/serialization/queryformats/QueryFormatTestHelper.java b/aai-core/src/test/java/org/onap/aai/serialization/queryformats/QueryFormatTestHelper.java index f05e36dd..03990b1d 100644 --- a/aai-core/src/test/java/org/onap/aai/serialization/queryformats/QueryFormatTestHelper.java +++ b/aai-core/src/test/java/org/onap/aai/serialization/queryformats/QueryFormatTestHelper.java @@ -46,7 +46,7 @@ public class QueryFormatTestHelper { public static void mockPathed(UrlBuilder mock) throws AAIFormatVertexException { Answer answer = new Answer() { public String answer(InvocationOnMock invocation) throws Throwable { - Vertex v = invocation.getArgumentAt(0, Vertex.class); + Vertex v = invocation.getArgument(0); return v.property(AAIProperties.AAI_URI).orElse("urimissing"); } diff --git a/aai-core/src/test/java/org/onap/aai/util/FileWatcherTest.java b/aai-core/src/test/java/org/onap/aai/util/FileWatcherTest.java index f4838304..2e870f6e 100644 --- a/aai-core/src/test/java/org/onap/aai/util/FileWatcherTest.java +++ b/aai-core/src/test/java/org/onap/aai/util/FileWatcherTest.java @@ -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)); } } diff --git a/aai-parent/pom.xml b/aai-parent/pom.xml index 5969d7e1..13565487 100644 --- a/aai-parent/pom.xml +++ b/aai-parent/pom.xml @@ -27,7 +27,7 @@ limitations under the License. org.onap.aai.aai-common aai-common - 1.6.5-SNAPSHOT + 1.6.6-SNAPSHOT aai-parent aai-parent @@ -96,6 +96,7 @@ limitations under the License. 3.1.1 0.9.10 1.25 + 1.5.22.RELEASE @@ -104,6 +105,7 @@ limitations under the License. 0.00 + 0.8.5 3.2 jacoco @@ -116,11 +118,29 @@ limitations under the License. 4.3.25.RELEASE 4.3.25.RELEASE 1.0.8.RELEASE + 1.1.1 + 2.0.4 + + + + spring-boot-2-1 + + 2.1.6.RELEASE + + + + + + com.googlecode.json-simple + json-simple + ${json.simple.version} + + org.onap.aai.aai-common aai-schema-ingest @@ -336,8 +356,13 @@ limitations under the License. org.powermock - powermock-api-mockito - ${powermock.version} + powermock-api-mockito2 + ${powermock.api.mockito2.version} + + + org.powermock + powermock-core + ${powermock.api.mockito2.version} org.powermock diff --git a/aai-rest/pom.xml b/aai-rest/pom.xml index d2716c0b..91fc7e48 100644 --- a/aai-rest/pom.xml +++ b/aai-rest/pom.xml @@ -29,7 +29,7 @@ org.onap.aai.aai-common aai-parent - 1.6.5-SNAPSHOT + 1.6.6-SNAPSHOT ../aai-parent/pom.xml aai-rest diff --git a/aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java b/aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java index b5a0101d..31dd0c92 100644 --- a/aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java +++ b/aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java @@ -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()); } diff --git a/aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java b/aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java index 30545dba..aa672575 100644 --- a/aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java +++ b/aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java @@ -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()); diff --git a/aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java b/aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java index a69977ff..58f2106c 100644 --- a/aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java +++ b/aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java @@ -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()); diff --git a/aai-schema-abstraction/pom.xml b/aai-schema-abstraction/pom.xml index 581a36b6..4f216fc4 100644 --- a/aai-schema-abstraction/pom.xml +++ b/aai-schema-abstraction/pom.xml @@ -28,7 +28,7 @@ org.onap.aai.aai-common aai-parent - 1.6.5-SNAPSHOT + 1.6.6-SNAPSHOT ../aai-parent/pom.xml diff --git a/aai-schema-ingest/pom.xml b/aai-schema-ingest/pom.xml index d5e20ea6..1717ad41 100644 --- a/aai-schema-ingest/pom.xml +++ b/aai-schema-ingest/pom.xml @@ -15,7 +15,7 @@ org.onap.aai.aai-common aai-parent - 1.6.5-SNAPSHOT + 1.6.6-SNAPSHOT ../aai-parent/pom.xml aai-schema-ingest diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/config/SchemaServiceConfiguration.java b/aai-schema-ingest/src/main/java/org/onap/aai/config/SchemaServiceConfiguration.java index cdd87492..245dce97 100644 --- a/aai-schema-ingest/src/main/java/org/onap/aai/config/SchemaServiceConfiguration.java +++ b/aai-schema-ingest/src/main/java/org/onap/aai/config/SchemaServiceConfiguration.java @@ -44,7 +44,7 @@ public class SchemaServiceConfiguration { return schemaVersionsBean().getSchemaVersions(); } - @Bean(name = "schemaVersions") + @Bean(name = "schemaVersions2") public SchemaVersions schemaVersions() { return schemaServiceVersions(); } diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java index af94765f..b7688472 100644 --- a/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java +++ b/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java @@ -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; diff --git a/aai-utils/pom.xml b/aai-utils/pom.xml index 1930e98c..91f507cf 100644 --- a/aai-utils/pom.xml +++ b/aai-utils/pom.xml @@ -29,7 +29,7 @@ org.onap.aai.aai-common aai-parent - 1.6.5-SNAPSHOT + 1.6.6-SNAPSHOT ../aai-parent/pom.xml aai-utils diff --git a/pom.xml b/pom.xml index 9253a49d..9b3fe4a8 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ org.onap.aai.aai-common aai-common - 1.6.5-SNAPSHOT + 1.6.6-SNAPSHOT pom aai-aai-common Contains all of the common code for resources and traversal repos diff --git a/version.properties b/version.properties index 716f7d49..16fa561c 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ major_version=1 minor_version=6 -patch_version=5 +patch_version=6 base_version=${major_version}.${minor_version}.${patch_version} -- 2.16.6