summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Reehil <william.reehil@att.com>2022-11-15 14:31:10 +0000
committerGerrit Code Review <gerrit@onap.org>2022-11-15 14:31:10 +0000
commit31ab53b6ad8a4bc0a0405d0c8193e7d59c01b98d (patch)
tree9ea7fbd25e281f884a7ce2ccec94642c40b6d913
parenta05789019bfd36f36a175ce5970dc46b9f55594d (diff)
parent40692ec87600214b6a5a3be6885286867d5393d2 (diff)
Merge "Reduce the number of problems in resources by removing unused imports"
-rw-r--r--aai-resources/src/main/java/org/onap/aai/TenantIsolation/DataImportTasks.java8
-rw-r--r--aai-resources/src/main/java/org/onap/aai/interceptors/pre/HeaderValidation.java2
-rw-r--r--aai-resources/src/main/java/org/onap/aai/interceptors/pre/RequestHeaderManipulation.java4
-rw-r--r--aai-resources/src/main/java/org/onap/aai/interceptors/pre/VersionInterceptor.java1
-rw-r--r--aai-resources/src/main/java/org/onap/aai/rest/URLFromVertexIdConsumer.java1
-rw-r--r--aai-resources/src/test/java/org/onap/aai/rest/PserverRelationshipTest.java1
-rw-r--r--pom.xml3
7 files changed, 2 insertions, 18 deletions
diff --git a/aai-resources/src/main/java/org/onap/aai/TenantIsolation/DataImportTasks.java b/aai-resources/src/main/java/org/onap/aai/TenantIsolation/DataImportTasks.java
index 3aeac7e..e32d404 100644
--- a/aai-resources/src/main/java/org/onap/aai/TenantIsolation/DataImportTasks.java
+++ b/aai-resources/src/main/java/org/onap/aai/TenantIsolation/DataImportTasks.java
@@ -29,23 +29,15 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.text.SimpleDateFormat;
-import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
-import java.util.Map;
-import java.util.NavigableMap;
import java.util.Properties;
-import java.util.TreeMap;
-import java.util.UUID;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.comparator.LastModifiedFileComparator;
import org.apache.commons.io.filefilter.DirectoryFileFilter;
import org.apache.commons.io.filefilter.FileFileFilter;
-import org.apache.commons.io.filefilter.RegexFileFilter;
import org.onap.aai.exceptions.AAIException;
import org.onap.aai.logging.ErrorLogHelper;
import org.onap.aai.util.AAIConfig;
diff --git a/aai-resources/src/main/java/org/onap/aai/interceptors/pre/HeaderValidation.java b/aai-resources/src/main/java/org/onap/aai/interceptors/pre/HeaderValidation.java
index f0eaac9..294cb0a 100644
--- a/aai-resources/src/main/java/org/onap/aai/interceptors/pre/HeaderValidation.java
+++ b/aai-resources/src/main/java/org/onap/aai/interceptors/pre/HeaderValidation.java
@@ -24,7 +24,6 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
-import java.util.UUID;
import javax.annotation.Priority;
import javax.ws.rs.container.ContainerRequestContext;
@@ -39,7 +38,6 @@ import org.onap.aai.interceptors.AAIHeaderProperties;
import org.onap.aai.logging.ErrorLogHelper;
import org.onap.logging.filter.base.Constants;
import org.onap.logging.filter.base.ONAPComponents;
-import org.onap.logging.filter.base.SimpleMap;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
@PreMatching
diff --git a/aai-resources/src/main/java/org/onap/aai/interceptors/pre/RequestHeaderManipulation.java b/aai-resources/src/main/java/org/onap/aai/interceptors/pre/RequestHeaderManipulation.java
index b70ff06..3fb6c81 100644
--- a/aai-resources/src/main/java/org/onap/aai/interceptors/pre/RequestHeaderManipulation.java
+++ b/aai-resources/src/main/java/org/onap/aai/interceptors/pre/RequestHeaderManipulation.java
@@ -20,13 +20,10 @@
package org.onap.aai.interceptors.pre;
-import java.io.IOException;
import java.util.Collections;
import java.util.regex.Matcher;
-import java.util.regex.Pattern;
import javax.annotation.Priority;
-import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerRequestFilter;
import javax.ws.rs.container.PreMatching;
@@ -34,7 +31,6 @@ import javax.ws.rs.core.MultivaluedMap;
import org.onap.aai.interceptors.AAIContainerFilter;
import org.onap.aai.interceptors.AAIHeaderProperties;
-import org.springframework.beans.factory.annotation.Autowired;
@PreMatching
@Priority(AAIRequestFilterPriority.HEADER_MANIPULATION)
diff --git a/aai-resources/src/main/java/org/onap/aai/interceptors/pre/VersionInterceptor.java b/aai-resources/src/main/java/org/onap/aai/interceptors/pre/VersionInterceptor.java
index 5d21141..01cd013 100644
--- a/aai-resources/src/main/java/org/onap/aai/interceptors/pre/VersionInterceptor.java
+++ b/aai-resources/src/main/java/org/onap/aai/interceptors/pre/VersionInterceptor.java
@@ -20,7 +20,6 @@
package org.onap.aai.interceptors.pre;
-import java.net.URI;
import java.util.ArrayList;
import java.util.Set;
import java.util.regex.Matcher;
diff --git a/aai-resources/src/main/java/org/onap/aai/rest/URLFromVertexIdConsumer.java b/aai-resources/src/main/java/org/onap/aai/rest/URLFromVertexIdConsumer.java
index b57181e..bf29fd0 100644
--- a/aai-resources/src/main/java/org/onap/aai/rest/URLFromVertexIdConsumer.java
+++ b/aai-resources/src/main/java/org/onap/aai/rest/URLFromVertexIdConsumer.java
@@ -43,7 +43,6 @@ import org.onap.aai.restcore.RESTAPI;
import org.onap.aai.serialization.db.DBSerializer;
import org.onap.aai.serialization.engines.TransactionalGraphEngine;
import org.onap.aai.setup.SchemaVersion;
-import org.onap.aai.util.AAIConfig;
/**
* The Class URLFromVertexIdConsumer.
diff --git a/aai-resources/src/test/java/org/onap/aai/rest/PserverRelationshipTest.java b/aai-resources/src/test/java/org/onap/aai/rest/PserverRelationshipTest.java
index 005ad16..6e52df0 100644
--- a/aai-resources/src/test/java/org/onap/aai/rest/PserverRelationshipTest.java
+++ b/aai-resources/src/test/java/org/onap/aai/rest/PserverRelationshipTest.java
@@ -33,7 +33,6 @@ import java.util.Set;
import org.junit.Test;
import org.onap.aai.PayloadUtil;
-import org.onap.aai.util.MapperUtil;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
diff --git a/pom.xml b/pom.xml
index 8a18a4e..adfa691 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,12 +75,13 @@
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
- <version>1.18.0</version>
+ <version>2.27.2</version>
<configuration>
<java>
<importOrder>
<order>com,java,javax,org</order>
</importOrder>
+ <removeUnusedImports/>
</java>
</configuration>
<!-- https://github.com/diffplug/spotless/tree/master/plugin-maven