From 9c0c0c8f61a08aec5c95ebb90647a0aae445e129 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Fri, 19 Jun 2020 17:04:51 +0100 Subject: Changes for checkstyle 8.32 Issue-ID: POLICY-2188 Change-Id: I56bbf3aa3bd9e1ef433cc93ad2be0c54d141a2a5 Signed-off-by: liamfallon --- .../org/onap/policy/apex/model/modelapi/ApexApiResult.java | 1 - .../onap/policy/apex/model/modelapi/ApexModelFactory.java | 1 - .../onap/policy/apex/model/modelapi/impl/ApexModelImpl.java | 1 - .../policy/apex/model/modelapi/impl/ContextAlbumFacade.java | 1 - .../apex/model/modelapi/impl/ContextSchemaFacade.java | 1 - .../onap/policy/apex/model/modelapi/impl/EventFacade.java | 1 - .../apex/model/modelapi/impl/KeyInformationFacade.java | 1 - .../onap/policy/apex/model/modelapi/impl/ModelFacade.java | 13 ++++++------- .../policy/apex/model/modelapi/impl/ModelHandlerFacade.java | 6 ++---- .../onap/policy/apex/model/modelapi/impl/PolicyFacade.java | 1 - .../onap/policy/apex/model/modelapi/impl/TaskFacade.java | 1 - .../onap/policy/apex/model/modelapi/ApexApiResultTest.java | 1 - .../onap/policy/apex/model/modelapi/ApexModelApiTest.java | 1 - .../onap/policy/apex/model/modelapi/ModelFacadeTest.java | 1 - .../policy/apex/model/modelapi/ModelHandlerFacadeTest.java | 1 - 15 files changed, 8 insertions(+), 24 deletions(-) (limited to 'model/model-api') diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/ApexApiResult.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/ApexApiResult.java index 65bd84add..7d69ff551 100644 --- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/ApexApiResult.java +++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/ApexApiResult.java @@ -24,7 +24,6 @@ import java.io.PrintWriter; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; - import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/ApexModelFactory.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/ApexModelFactory.java index ad0f0b4fa..5be8b02b8 100644 --- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/ApexModelFactory.java +++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/ApexModelFactory.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.model.modelapi; import java.util.Properties; - import org.onap.policy.apex.model.modelapi.impl.ApexModelImpl; /** diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java index cdbe62351..655bd6ae5 100644 --- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java +++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.model.modelapi.impl; import java.util.Properties; - import org.onap.policy.apex.model.basicmodel.dao.DaoParameters; import org.onap.policy.apex.model.modelapi.ApexApiResult; import org.onap.policy.apex.model.modelapi.ApexModel; diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java index dfc29b302..826fb9250 100644 --- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java +++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextAlbumFacade.java @@ -24,7 +24,6 @@ package org.onap.policy.apex.model.modelapi.impl; import java.util.Properties; import java.util.Set; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; import org.onap.policy.apex.model.basicmodel.handling.ApexModelStringWriter; diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextSchemaFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextSchemaFacade.java index 8b479ebfd..00156c5bd 100644 --- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextSchemaFacade.java +++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ContextSchemaFacade.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.model.modelapi.impl; import java.util.Properties; import java.util.Set; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; import org.onap.policy.apex.model.basicmodel.handling.ApexModelStringWriter; diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/EventFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/EventFacade.java index 8df43f99f..0a758407b 100644 --- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/EventFacade.java +++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/EventFacade.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.model.modelapi.impl; import java.util.Properties; import java.util.Set; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/KeyInformationFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/KeyInformationFacade.java index 7cbcfc713..82fc86a77 100644 --- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/KeyInformationFacade.java +++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/KeyInformationFacade.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.model.modelapi.impl; import java.util.Properties; import java.util.Set; import java.util.UUID; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelFacade.java index cba72018f..2adf99050 100644 --- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelFacade.java +++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelFacade.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.modelapi.impl; import java.util.Properties; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.handling.ApexModelStringWriter; import org.onap.policy.apex.model.modelapi.ApexApiResult; @@ -193,12 +192,12 @@ public class ModelFacade { */ public ApexApiResult deleteModel() { // @formatter:off - apexModel.getPolicyModel().getSchemas() .getSchemasMap() .clear(); - apexModel.getPolicyModel().getEvents() .getEventMap() .clear(); - apexModel.getPolicyModel().getAlbums() .getAlbumsMap() .clear(); - apexModel.getPolicyModel().getTasks() .getTaskMap() .clear(); - apexModel.getPolicyModel().getPolicies() .getPolicyMap() .clear(); - apexModel.getPolicyModel().getKeyInformation().getKeyInfoMap() .clear(); + apexModel.getPolicyModel().getSchemas().getSchemasMap().clear(); + apexModel.getPolicyModel().getEvents().getEventMap().clear(); + apexModel.getPolicyModel().getAlbums().getAlbumsMap().clear(); + apexModel.getPolicyModel().getTasks().getTaskMap().clear(); + apexModel.getPolicyModel().getPolicies().getPolicyMap().clear(); + apexModel.getPolicyModel().getKeyInformation().getKeyInfoMap().clear(); // @formatter:on apexModel.setPolicyModel(new AxPolicyModel()); diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelHandlerFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelHandlerFacade.java index 8acf3fc45..5e5d39c9b 100644 --- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelHandlerFacade.java +++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ModelHandlerFacade.java @@ -33,7 +33,6 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Properties; import java.util.Set; - import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.ApexRuntimeException; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; @@ -198,9 +197,8 @@ public class ModelHandlerFacade { return new ApexApiResult(ApexApiResult.Result.FAILED, "no policy model with name " + modelName + " and version " + modelVersion + FOUND_IN_DATABASE); } - } - // Fishing expedition - else { + } else { + // Fishing expedition return searchInDatabase(modelName, apexDao, apexModel); } } catch (ApexException | ApexRuntimeException e) { diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/PolicyFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/PolicyFacade.java index b600b152e..0c0a51691 100644 --- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/PolicyFacade.java +++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/PolicyFacade.java @@ -26,7 +26,6 @@ import java.util.Map.Entry; import java.util.Properties; import java.util.Set; import java.util.TreeSet; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/TaskFacade.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/TaskFacade.java index 3632e7663..a6f4a87cb 100644 --- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/TaskFacade.java +++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/TaskFacade.java @@ -24,7 +24,6 @@ package org.onap.policy.apex.model.modelapi.impl; import java.util.Properties; import java.util.Set; import java.util.TreeSet; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; diff --git a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexApiResultTest.java b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexApiResultTest.java index 43a9fa42e..3c2af18ea 100644 --- a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexApiResultTest.java +++ b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexApiResultTest.java @@ -27,7 +27,6 @@ import static org.junit.Assert.assertTrue; import java.io.IOException; import java.util.Arrays; - import org.junit.Test; import org.onap.policy.apex.model.modelapi.ApexApiResult.Result; diff --git a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexModelApiTest.java b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexModelApiTest.java index e6d948f35..f8d7fd696 100644 --- a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexModelApiTest.java +++ b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexModelApiTest.java @@ -32,7 +32,6 @@ import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; import java.util.UUID; - import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ModelFacadeTest.java b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ModelFacadeTest.java index d5b845658..ac8f26095 100644 --- a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ModelFacadeTest.java +++ b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ModelFacadeTest.java @@ -26,7 +26,6 @@ import static org.junit.Assert.fail; import java.util.Properties; import java.util.UUID; - import org.junit.Test; import org.onap.policy.apex.model.modelapi.impl.ModelFacade; diff --git a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ModelHandlerFacadeTest.java b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ModelHandlerFacadeTest.java index cfbf1be57..a34b4f474 100644 --- a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ModelHandlerFacadeTest.java +++ b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ModelHandlerFacadeTest.java @@ -28,7 +28,6 @@ import static org.junit.Assert.fail; import java.io.File; import java.io.IOException; import java.util.Properties; - import org.junit.Test; import org.onap.policy.apex.model.basicmodel.dao.DaoParameters; import org.onap.policy.apex.model.modelapi.impl.ModelHandlerFacade; -- cgit 1.2.3-korg