From d39d85bd6fc7ad50747c910758815f8600bab444 Mon Sep 17 00:00:00 2001 From: "Singal, Kapil (ks220y)" Date: Wed, 18 Sep 2019 12:23:42 -0400 Subject: Optimizing Imports and Formatting code No Business logic change, no code change.. just optimizing imports and reformatting code Issue-ID: CCSDK-1744 Signed-off-by: Singal, Kapil (ks220y) Change-Id: I1fb2ed10525a6f392f3c0d963c2ed03cfe8dec7e --- ms/blueprintsprocessor/application/pom.xml | 1 - .../security/BasicAuthServerInterceptor.java | 11 ++++------ .../application/src/main/resources/logback.xml | 1 - .../blueprintsprocessor/ExtendedTemporaryFolder.kt | 7 ++----- ms/blueprintsprocessor/distribution/pom.xml | 2 +- .../src/test/resources/logback-test.xml | 8 ++++---- .../src/test/resources/logback-test.xml | 12 +++++------ .../src/test/resources/logback-test.xml | 8 ++++---- .../payload/requests/interface-candidate.xml | 6 +++--- .../payload/requests/interface-running.xml | 8 ++++---- .../src/test/resources/logback-test.xml | 14 ++++++------- .../src/test/resources/logback-test.xml | 8 ++++---- .../src/test/resources/logback-test.xml | 12 +++++------ .../src/test/resources/logback-test.xml | 10 ++++----- .../db/primary/MariaDatabaseConfiguration.kt | 5 ----- .../BlueprintProcessorCatalogServiceImpl.kt | 1 + .../ControllerBlueprintCatalogServiceImpl.kt | 1 + .../dmaap-lib/src/test/resources/logback-test.xml | 1 - .../rest/service/BasicAuthRestClientService.kt | 4 ---- .../service/BluePrintRestLibPropertyService.kt | 10 +-------- .../rest/service/RestClientServiceTest.kt | 9 +------- .../api/ResourceConfigSnapshotControllerTest.kt | 3 +-- .../configs-api/src/test/resources/logback.xml | 1 - .../src/test/resources/logback-test.xml | 3 +-- .../healthapi/HealthCheckServiceTest.java | 13 ++++++------ .../health-api/src/test/resources/logback.xml | 1 - .../resource/api/TemplateController.kt | 1 - .../resource-api/src/test/resources/logback.xml | 1 - .../selfservice/api/utils/BluePrintMappings.kt | 6 +----- .../src/test/resources/logback-test.xml | 1 - .../src/test/resources/logback-test.xml | 1 - .../workflow/DGWorkflowExecutionServiceTest.kt | 3 +-- .../src/test/resources/logback.xml | 1 - .../core/utils/BluePrintArchiveUtils.kt | 23 ++++++--------------- .../core/utils/BluePrintFileUtils.kt | 5 +---- .../dict/utils/ResourceDictionaryUtilsTest.java | 5 ++--- .../client/SdcListenerAuthClientInterceptor.java | 8 +------- .../onap/ccsdk/cds/sdclistener/util/FileUtil.java | 10 +++++---- .../application/src/main/resources/logback.xml | 24 +++++++++++----------- .../cds/sdclistener/SdcListenerClientTest.java | 7 +------ .../service/ListenerServiceImplTest.java | 18 ++++++++-------- ms/sdclistener/distribution/pom.xml | 2 +- 42 files changed, 104 insertions(+), 172 deletions(-) (limited to 'ms') diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml index 90e9f501b..1c12469f4 100755 --- a/ms/blueprintsprocessor/application/pom.xml +++ b/ms/blueprintsprocessor/application/pom.xml @@ -78,7 +78,6 @@ health-api - org.onap.ccsdk.cds.blueprintsprocessor.functions diff --git a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/security/BasicAuthServerInterceptor.java b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/security/BasicAuthServerInterceptor.java index 380ed3618..d0bf9e87f 100644 --- a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/security/BasicAuthServerInterceptor.java +++ b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/security/BasicAuthServerInterceptor.java @@ -16,13 +16,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.security; import com.google.common.base.Strings; -import io.grpc.Metadata; -import io.grpc.ServerCall; -import io.grpc.ServerCallHandler; -import io.grpc.ServerInterceptor; -import io.grpc.Status; -import java.nio.charset.StandardCharsets; -import java.util.Base64; +import io.grpc.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -33,6 +27,9 @@ import org.springframework.security.core.AuthenticationException; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Component; +import java.nio.charset.StandardCharsets; +import java.util.Base64; + @Component public class BasicAuthServerInterceptor implements ServerInterceptor { diff --git a/ms/blueprintsprocessor/application/src/main/resources/logback.xml b/ms/blueprintsprocessor/application/src/main/resources/logback.xml index 872ee4f15..6f917096d 100644 --- a/ms/blueprintsprocessor/application/src/main/resources/logback.xml +++ b/ms/blueprintsprocessor/application/src/main/resources/logback.xml @@ -23,7 +23,6 @@ - diff --git a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ExtendedTemporaryFolder.kt b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ExtendedTemporaryFolder.kt index 3c517e6ac..57b4573ef 100644 --- a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ExtendedTemporaryFolder.kt +++ b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ExtendedTemporaryFolder.kt @@ -22,11 +22,8 @@ package org.onap.ccsdk.cds.blueprintsprocessor import org.junit.rules.TemporaryFolder import java.io.File import java.io.IOException -import java.nio.file.FileVisitResult -import java.nio.file.Files -import java.nio.file.Path -import java.nio.file.SimpleFileVisitor -import java.nio.file.attribute.BasicFileAttributes +import java.nio.file.* +import java.nio.file.attribute.* import javax.annotation.PreDestroy class ExtendedTemporaryFolder { diff --git a/ms/blueprintsprocessor/distribution/pom.xml b/ms/blueprintsprocessor/distribution/pom.xml index bbf9239d8..884d76a66 100755 --- a/ms/blueprintsprocessor/distribution/pom.xml +++ b/ms/blueprintsprocessor/distribution/pom.xml @@ -84,7 +84,7 @@ package - + diff --git a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/logback-test.xml index 1f9076125..c2cfa9bbc 100644 --- a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/logback-test.xml @@ -23,12 +23,12 @@ - - - + + + - + diff --git a/ms/blueprintsprocessor/functions/cli-executor/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/cli-executor/src/test/resources/logback-test.xml index 3fe7da807..688a533be 100644 --- a/ms/blueprintsprocessor/functions/cli-executor/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/functions/cli-executor/src/test/resources/logback-test.xml @@ -23,14 +23,14 @@ - - - - - + + + + + - + diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/logback-test.xml index 1c729f6f7..6598dccfa 100644 --- a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/logback-test.xml @@ -23,12 +23,12 @@ - - - + + + - + diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-candidate.xml b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-candidate.xml index 3ab0bca09..7914dd1b5 100644 --- a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-candidate.xml +++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-candidate.xml @@ -16,11 +16,11 @@ --> - - + + Full-Duplex - + 34 diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-running.xml b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-running.xml index cd2cab847..425d70460 100644 --- a/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-running.xml +++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/resources/payload/requests/interface-running.xml @@ -16,17 +16,17 @@ --> - - + + Full-Duplex - + Never 0 0 - + \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/logback-test.xml index 2aaaead3e..da4cf9a1b 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/resources/logback-test.xml @@ -23,15 +23,15 @@ - - - - - - + + + + + + - + diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/python-executor/src/test/resources/logback-test.xml index 8d0e8ee04..f06ea1431 100644 --- a/ms/blueprintsprocessor/functions/python-executor/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/functions/python-executor/src/test/resources/logback-test.xml @@ -23,12 +23,12 @@ - - - + + + - + diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/logback-test.xml index 0c44875a6..f915b1ae3 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/logback-test.xml @@ -23,14 +23,14 @@ - - - - - + + + + + - + diff --git a/ms/blueprintsprocessor/functions/restconf-executor/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/restconf-executor/src/test/resources/logback-test.xml index 9d6ab2018..daab7eaf8 100644 --- a/ms/blueprintsprocessor/functions/restconf-executor/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/functions/restconf-executor/src/test/resources/logback-test.xml @@ -23,13 +23,13 @@ - - - - + + + + - + diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MariaDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MariaDatabaseConfiguration.kt index 5015388b9..6a0d4a0c5 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MariaDatabaseConfiguration.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MariaDatabaseConfiguration.kt @@ -21,11 +21,6 @@ import org.onap.ccsdk.cds.blueprintsprocessor.db.MariaDataSourceProperties import org.slf4j.LoggerFactory import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate import org.springframework.jdbc.datasource.DriverManagerDataSource -import org.springframework.orm.jpa.JpaTransactionManager -import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean -import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter -import org.springframework.transaction.PlatformTransactionManager -import java.util.* import javax.sql.DataSource class MariaDatabaseConfiguration(private val mariaDataSourceProperties: MariaDataSourceProperties) : BluePrintDBLibGenericService { diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/service/BlueprintProcessorCatalogServiceImpl.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/service/BlueprintProcessorCatalogServiceImpl.kt index 3e0f3516f..5d04ddfdf 100755 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/service/BlueprintProcessorCatalogServiceImpl.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/service/BlueprintProcessorCatalogServiceImpl.kt @@ -34,6 +34,7 @@ import org.springframework.stereotype.Service import java.io.File import java.nio.file.Path import java.util.* + // TODO("Duplicate : Merge BlueprintProcessorCatalogServiceImpl and ControllerBlueprintCatalogServiceImpl") /** * Similar/Duplicate implementation in [org.onap.ccsdk.cds.controllerblueprints.service.load.ControllerBlueprintCatalogServiceImpl] diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/service/ControllerBlueprintCatalogServiceImpl.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/service/ControllerBlueprintCatalogServiceImpl.kt index 4c02fda12..e7a8e31a7 100755 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/service/ControllerBlueprintCatalogServiceImpl.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/service/ControllerBlueprintCatalogServiceImpl.kt @@ -35,6 +35,7 @@ import java.io.File import java.nio.file.Files import java.nio.file.Path import java.util.* + //TODO("Duplicate : Merge BlueprintProcessorCatalogServiceImpl and ControllerBlueprintCatalogServiceImpl") /** * Similar implementation in [org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintProcessorCatalogServiceImpl] diff --git a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/test/resources/logback-test.xml index cff57423d..dad15aa4a 100644 --- a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/test/resources/logback-test.xml @@ -18,7 +18,6 @@ ~ ============LICENSE_END========================================================= --> - @@ -25,7 +25,6 @@ - diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckServiceTest.java b/ms/blueprintsprocessor/modules/inbounds/health-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckServiceTest.java index 8fb5e58fc..128c80adf 100644 --- a/ms/blueprintsprocessor/modules/inbounds/health-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckServiceTest.java +++ b/ms/blueprintsprocessor/modules/inbounds/health-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckServiceTest.java @@ -16,13 +16,6 @@ package org.onap.ccsdk.cds.blueprintsprocessor.healthapi; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.anyString; - import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -39,6 +32,12 @@ import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BasicAuthRestClientSe import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService.WebClientResponse; import org.springframework.http.HttpMethod; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.anyString; + @RunWith(MockitoJUnitRunner.class) public class HealthCheckServiceTest { diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api/src/test/resources/logback.xml b/ms/blueprintsprocessor/modules/inbounds/health-api/src/test/resources/logback.xml index ed92b8963..c97e1cd29 100644 --- a/ms/blueprintsprocessor/modules/inbounds/health-api/src/test/resources/logback.xml +++ b/ms/blueprintsprocessor/modules/inbounds/health-api/src/test/resources/logback.xml @@ -23,7 +23,6 @@ - diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateController.kt b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateController.kt index de5843a66..93253a554 100644 --- a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateController.kt +++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateController.kt @@ -24,7 +24,6 @@ import kotlinx.coroutines.runBlocking import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db.TemplateResolution import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db.TemplateResolutionService import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils -import org.springframework.dao.EmptyResultDataAccessException import org.springframework.http.MediaType import org.springframework.http.ResponseEntity import org.springframework.security.access.prepost.PreAuthorize diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/resources/logback.xml b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/resources/logback.xml index c546502cf..9c690fcc9 100644 --- a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/resources/logback.xml +++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/resources/logback.xml @@ -23,7 +23,6 @@ - diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/BluePrintMappings.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/BluePrintMappings.kt index b5984d738..46633aa60 100644 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/BluePrintMappings.kt +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/BluePrintMappings.kt @@ -19,11 +19,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode import com.google.common.base.Strings import com.google.protobuf.Struct import com.google.protobuf.util.JsonFormat -import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers -import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader -import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType -import org.onap.ccsdk.cds.controllerblueprints.common.api.Flag -import org.onap.ccsdk.cds.controllerblueprints.common.api.Status +import org.onap.ccsdk.cds.controllerblueprints.common.api.* import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/resources/logback-test.xml index dd81657a4..117746fa2 100644 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/resources/logback-test.xml @@ -23,7 +23,6 @@ - diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/modules/services/execution-service/src/test/resources/logback-test.xml index da1553d2c..703a52642 100644 --- a/ms/blueprintsprocessor/modules/services/execution-service/src/test/resources/logback-test.xml +++ b/ms/blueprintsprocessor/modules/services/execution-service/src/test/resources/logback-test.xml @@ -23,7 +23,6 @@ - diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionServiceTest.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionServiceTest.kt index 6e7e3cb8d..3ac5cd864 100644 --- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionServiceTest.kt +++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionServiceTest.kt @@ -29,7 +29,6 @@ import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonReactorUtils import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.ApplicationContext -import org.springframework.test.annotation.DirtiesContext import org.springframework.test.context.ContextConfiguration import org.springframework.test.context.junit4.SpringRunner import kotlin.test.assertEquals @@ -76,4 +75,4 @@ class DGWorkflowExecutionServiceTest { } -} \ No newline at end of file +} diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/resources/logback.xml b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/resources/logback.xml index 32459375e..1a6114bb8 100644 --- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/resources/logback.xml +++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/resources/logback.xml @@ -23,7 +23,6 @@ - diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintArchiveUtils.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintArchiveUtils.kt index 2f082db9c..097967313 100755 --- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintArchiveUtils.kt +++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintArchiveUtils.kt @@ -21,23 +21,12 @@ package org.onap.ccsdk.cds.controllerblueprints.core.utils import com.google.common.base.Predicates import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException import org.slf4j.LoggerFactory -import java.io.BufferedInputStream -import java.io.ByteArrayOutputStream -import java.io.File -import java.io.FileOutputStream -import java.io.IOException -import java.io.OutputStream -import java.nio.charset.Charset -import java.nio.file.FileVisitResult -import java.nio.file.Files -import java.nio.file.Path -import java.nio.file.SimpleFileVisitor -import java.nio.file.attribute.BasicFileAttributes -import java.util.function.Predicate -import java.util.zip.Deflater -import java.util.zip.ZipEntry -import java.util.zip.ZipFile -import java.util.zip.ZipOutputStream +import java.io.* +import java.nio.charset.* +import java.nio.file.* +import java.nio.file.attribute.* +import java.util.function.* +import java.util.zip.* class BluePrintArchiveUtils { diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintFileUtils.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintFileUtils.kt index 17a7fd348..06f6f1d17 100755 --- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintFileUtils.kt +++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintFileUtils.kt @@ -32,10 +32,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext import org.slf4j.LoggerFactory import java.io.File import java.io.FileFilter -import java.nio.file.Files -import java.nio.file.Path -import java.nio.file.Paths -import java.nio.file.StandardOpenOption +import java.nio.file.* class BluePrintFileUtils { diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java index ce479d6df..16b02d86c 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java +++ b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java @@ -17,7 +17,6 @@ package org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils; - import com.fasterxml.jackson.databind.JsonNode; import org.junit.Assert; import org.junit.Test; @@ -27,11 +26,11 @@ import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils; import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment; import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition; import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDictionaryConstants; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.HashMap; import java.util.Map; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * ResourceDictionaryUtilsTest. diff --git a/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/client/SdcListenerAuthClientInterceptor.java b/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/client/SdcListenerAuthClientInterceptor.java index 5866a63e0..b981b806c 100644 --- a/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/client/SdcListenerAuthClientInterceptor.java +++ b/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/client/SdcListenerAuthClientInterceptor.java @@ -15,14 +15,8 @@ */ package org.onap.ccsdk.cds.sdclistener.client; -import io.grpc.CallOptions; -import io.grpc.Channel; -import io.grpc.ClientCall; -import io.grpc.ClientInterceptor; -import io.grpc.ForwardingClientCall; -import io.grpc.Metadata; +import io.grpc.*; import io.grpc.Metadata.Key; -import io.grpc.MethodDescriptor; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; diff --git a/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/util/FileUtil.java b/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/util/FileUtil.java index b6d0e4809..42b795634 100644 --- a/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/util/FileUtil.java +++ b/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/util/FileUtil.java @@ -15,7 +15,10 @@ */ package org.onap.ccsdk.cds.sdclistener.util; -import static java.nio.file.Files.walk; +import org.apache.commons.io.FileUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.io.File; import java.io.IOException; import java.nio.file.Files; @@ -24,9 +27,8 @@ import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; -import org.apache.commons.io.FileUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; + +import static java.nio.file.Files.walk; public final class FileUtil { private static final Logger LOGGER = LoggerFactory.getLogger(FileUtils.class); diff --git a/ms/sdclistener/application/src/main/resources/logback.xml b/ms/sdclistener/application/src/main/resources/logback.xml index b26cbcbe4..62465fde9 100644 --- a/ms/sdclistener/application/src/main/resources/logback.xml +++ b/ms/sdclistener/application/src/main/resources/logback.xml @@ -16,18 +16,18 @@ limitations under the License. --> - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - - + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + + - - - + + + + + + + - - - - diff --git a/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/SdcListenerClientTest.java b/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/SdcListenerClientTest.java index c9f2c5a39..1e6d7cbae 100644 --- a/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/SdcListenerClientTest.java +++ b/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/SdcListenerClientTest.java @@ -15,12 +15,7 @@ */ package org.onap.ccsdk.cds.sdclistener; -import mockit.Expectations; -import mockit.Injectable; -import mockit.Mock; -import mockit.MockUp; -import mockit.Tested; -import mockit.VerificationsInOrder; +import mockit.*; import mockit.integration.junit4.JMockit; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImplTest.java b/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImplTest.java index aa8f8e4e8..25b5098ab 100644 --- a/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImplTest.java +++ b/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImplTest.java @@ -15,14 +15,6 @@ */ package org.onap.ccsdk.cds.sdclistener.service; -import static junit.framework.TestCase.assertTrue; -import static org.onap.ccsdk.cds.sdclistener.status.SdcListenerStatus.NotificationType.SDC_LISTENER_COMPONENT; -import static org.onap.sdc.utils.DistributionStatusEnum.COMPONENT_DONE_OK; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; import org.apache.commons.io.FileUtils; import org.junit.Before; import org.junit.Rule; @@ -46,6 +38,16 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.junit4.SpringRunner; +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +import static junit.framework.TestCase.assertTrue; +import static org.onap.ccsdk.cds.sdclistener.status.SdcListenerStatus.NotificationType.SDC_LISTENER_COMPONENT; +import static org.onap.sdc.utils.DistributionStatusEnum.COMPONENT_DONE_OK; + @RunWith(SpringRunner.class) @EnableConfigurationProperties({SdcListenerAuthClientInterceptor.class, BluePrintProcesssorHandler.class, SdcListenerDto.class, ListenerServiceImpl.class, SdcListenerStatus.class, diff --git a/ms/sdclistener/distribution/pom.xml b/ms/sdclistener/distribution/pom.xml index 58dabc0c6..ca6947841 100755 --- a/ms/sdclistener/distribution/pom.xml +++ b/ms/sdclistener/distribution/pom.xml @@ -85,7 +85,7 @@ package - + -- cgit 1.2.3-korg