[AAI] Unnecessary packages must be cleared from all java files for aai-resource module 03/140103/1
authoratul.m.singh <atul.m.singh@accenture.com>
Wed, 29 Jan 2025 06:09:54 +0000 (11:39 +0530)
committeratul.m.singh <atul.m.singh@accenture.com>
Wed, 29 Jan 2025 06:22:09 +0000 (11:52 +0530)
- Removed unused imports from the JAVA files so that unnecessary packages are ignored.

Issue-ID: AAI-4110
Change-Id: I96e34ea764faa3b7a70076ea349a9841f4ad7a0b
Signed-off-by: atul.m.singh <atul.m.singh@accenture.com>
aai-resources/src/main/java/org/onap/aai/interceptors/pre/AuthInterceptor.java
aai-resources/src/main/java/org/onap/aai/rest/ResourcesController.java
aai-resources/src/test/java/org/onap/aai/ResourcesTestConfiguration.java
aai-resources/src/test/java/org/onap/aai/entities/ModelElement.java
aai-resources/src/test/java/org/onap/aai/entities/ModelVersion.java
aai-resources/src/test/java/org/onap/aai/entities/PServer.java
aai-resources/src/test/java/org/onap/aai/entities/PServerListResponse.java
aai-resources/src/test/java/org/onap/aai/it/performance/K6ReadTest.java
aai-resources/src/test/java/org/onap/aai/it/performance/K6WriteTest.java
aai-resources/src/test/java/org/onap/aai/rest/resources/ResourcesControllerTest.java
aai-resources/src/test/java/org/onap/aai/rest/util/EchoResponseTest.java

index e590d9f..91c3d61 100644 (file)
@@ -23,7 +23,6 @@ package org.onap.aai.interceptors.pre;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Optional;
 import java.util.regex.Pattern;
 
 import javax.annotation.Priority;
index 1f66697..3e5fece 100644 (file)
@@ -23,20 +23,13 @@ package org.onap.aai.rest;
 
 import io.micrometer.core.annotation.Timed;
 import lombok.RequiredArgsConstructor;
-
-import java.security.Principal;
 import java.util.*;
-import java.util.stream.Collectors;
-
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.*;
 import javax.ws.rs.core.*;
 import javax.ws.rs.core.Response.Status;
-
-import org.apache.commons.lang3.ObjectUtils;
 import org.onap.aai.concurrent.AaiCallable;
 import org.onap.aai.introspection.Introspector;
-import org.onap.aai.introspection.sideeffect.OwnerCheck;
 import org.onap.aai.query.builder.Pageable;
 import org.onap.aai.restcore.HttpMethod;
 import org.onap.aai.restcore.RESTAPI;
index 0d7ff7e..47a9a8c 100644 (file)
 
 package org.onap.aai;
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
 
+import java.io.IOException;
 import javax.net.ssl.SSLContext;
 
 import org.apache.http.client.HttpClient;
@@ -41,7 +38,6 @@ import org.springframework.core.env.Profiles;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.client.ClientHttpResponse;
 import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
-import org.springframework.util.ResourceUtils;
 import org.springframework.web.client.ResponseErrorHandler;
 import org.springframework.web.client.RestTemplate;
 
index ae85780..18e7f4b 100644 (file)
  */
 package org.onap.aai.entities;
 
-import java.util.List;
-
 import com.fasterxml.jackson.annotation.JsonProperty;
-
 import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Data;
index 2e0a68c..5c2e7ca 100644 (file)
@@ -20,9 +20,7 @@
 package org.onap.aai.entities;
 
 import java.util.List;
-
 import com.fasterxml.jackson.annotation.JsonProperty;
-
 import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Data;
index 988328e..67bf020 100644 (file)
@@ -22,7 +22,6 @@ package org.onap.aai.entities;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.databind.PropertyNamingStrategy;
 import com.fasterxml.jackson.databind.annotation.JsonNaming;
-
 import lombok.Data;
 
 @Data
index 6d7a393..6ad21cd 100644 (file)
@@ -22,10 +22,8 @@ package org.onap.aai.it.performance;
 
 import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.MatcherAssert.assertThat;
-
 import java.util.UUID;
 import java.util.concurrent.TimeUnit;
-
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
 import org.janusgraph.core.JanusGraph;
 import org.junit.jupiter.api.AfterAll;
index b4a495c..7e5bd9c 100644 (file)
@@ -25,14 +25,12 @@ import static org.hamcrest.MatcherAssert.assertThat;
 
 import java.util.UUID;
 import java.util.concurrent.TimeUnit;
-
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
 import org.janusgraph.core.JanusGraph;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
-import org.onap.aai.ResourcesApp;
 import org.onap.aai.db.props.AAIProperties;
 import org.onap.aai.dbmap.AAIGraph;
 import org.slf4j.Logger;
index 6d0dcbf..e44d845 100644 (file)
@@ -28,26 +28,12 @@ import static org.hamcrest.Matchers.samePropertyValuesAs;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertIterableEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.when;
 
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 import java.util.UUID;
-
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedHashMap;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-
 import org.apache.commons.io.IOUtils;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
 import org.janusgraph.core.JanusGraph;
@@ -57,12 +43,9 @@ import org.json.JSONException;
 import org.json.JSONObject;
 import org.json.simple.parser.ParseException;
 import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.CsvSource;
 import org.junit.jupiter.params.provider.EnumSource;
-import org.mockito.Mockito;
 import org.onap.aai.config.WebClientConfiguration;
 import org.onap.aai.db.props.AAIProperties;
 import org.onap.aai.dbmap.AAIGraph;
@@ -73,9 +56,7 @@ import org.onap.aai.entities.PolicyException;
 import org.onap.aai.entities.ServiceException;
 import org.onap.aai.exceptions.AAIException;
 import org.onap.aai.rest.ResourcesController;
-import org.onap.aai.service.ResourcesService;
 import org.onap.aai.setup.SchemaVersions;
-import org.onap.aai.util.AAIConfig;
 import org.skyscreamer.jsonassert.JSONAssert;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -84,13 +65,8 @@ import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
 import org.springframework.context.annotation.Import;
 import org.springframework.http.HttpMethod;
-import org.springframework.mock.web.MockHttpServletRequest;
-import org.springframework.test.annotation.DirtiesContext;
-import org.springframework.test.annotation.DirtiesContext.ClassMode;
 import org.springframework.test.web.reactive.server.WebTestClient;
-
 import com.fasterxml.jackson.databind.ObjectMapper;
-
 import reactor.core.publisher.Mono;
 
 // @DirtiesContext(classMode = ClassMode.BEFORE_CLASS)
index f483cd9..acb807a 100644 (file)
@@ -24,8 +24,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import java.util.ArrayList;