summaryrefslogtreecommitdiffstats
path: root/aai-core
diff options
context:
space:
mode:
authorSneha Dantkale <Sneha.dantkale@amdocs.com>2020-02-14 19:15:02 +0530
committerForsyth, James (jf2512) <jf2512@att.com>2020-02-14 17:05:45 -0500
commit48960e6033145667366bbcd2f8ad1ae44c2fd260 (patch)
treee75e7d852ee672412422c4fae2689c804174796b /aai-core
parent54290b7443eb6f15c271031a6eef2f3e51c2f261 (diff)
[AAI-2528] | Update to spring-boot 2.1.6.RELEASE
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>
Diffstat (limited to 'aai-core')
-rw-r--r--aai-core/pom.xml20
-rw-r--r--aai-core/src/main/java/org/onap/aai/restcore/util/URITools.java34
-rw-r--r--aai-core/src/test/java/org/onap/aai/serialization/queryformats/QueryFormatTestHelper.java2
-rw-r--r--aai-core/src/test/java/org/onap/aai/util/FileWatcherTest.java6
4 files changed, 33 insertions, 29 deletions
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.
<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>
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<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;
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<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");
}
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));
}
}