diff options
author | liamfallon <liam.fallon@est.tech> | 2020-06-19 17:04:51 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2020-06-19 17:05:05 +0100 |
commit | 9c0c0c8f61a08aec5c95ebb90647a0aae445e129 (patch) | |
tree | 4224dadcc265e2980a6f097976a3beb34ce14e93 /model | |
parent | 73470fb02d3d8a2fb37e80d9fb23a75955da32b5 (diff) |
Changes for checkstyle 8.32
Issue-ID: POLICY-2188
Change-Id: I56bbf3aa3bd9e1ef433cc93ad2be0c54d141a2a5
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'model')
119 files changed, 69 insertions, 298 deletions
diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java index 3f2affb42..8bbc652e7 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java @@ -23,9 +23,7 @@ package org.onap.policy.apex.model.basicmodel.concepts; import java.io.Serializable; import java.util.List; - import javax.xml.bind.annotation.XmlType; - import org.onap.policy.common.utils.validation.Assertions; /** diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImpl.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImpl.java index 34c704c7b..175cded08 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImpl.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImpl.java @@ -24,7 +24,6 @@ package org.onap.policy.apex.model.basicmodel.concepts; import java.util.NavigableMap; import java.util.Set; import java.util.TreeSet; - import org.onap.policy.common.utils.validation.Assertions; /** @@ -78,8 +77,7 @@ public class AxConceptGetterImpl<C> implements AxConceptGetter<C> { break; } foundKey = nextkey; - } - while (true); + } while (true); return conceptMap.get(foundKey); } @@ -138,8 +136,7 @@ public class AxConceptGetterImpl<C> implements AxConceptGetter<C> { break; } returnSet.add(conceptMap.get(foundKey)); - } - while (true); + } while (true); return returnSet; } diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfo.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfo.java index 35010bf4b..fc8c0cd14 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfo.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfo.java @@ -24,7 +24,6 @@ package org.onap.policy.apex.model.basicmodel.concepts; import java.util.List; import java.util.Random; import java.util.UUID; - import javax.persistence.Column; import javax.persistence.Convert; import javax.persistence.EmbeddedId; @@ -36,7 +35,6 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - import org.apache.commons.lang3.StringUtils; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; import org.onap.policy.apex.model.basicmodel.dao.converters.CDataConditioner; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInformation.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInformation.java index 977cfcf4f..fc876d8ea 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInformation.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInformation.java @@ -29,7 +29,6 @@ import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; import java.util.UUID; - import javax.persistence.CascadeType; import javax.persistence.EmbeddedId; import javax.persistence.Entity; @@ -42,7 +41,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; import org.onap.policy.common.utils.validation.Assertions; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUse.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUse.java index 8eed845ad..fe786469b 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUse.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUse.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.basicmodel.concepts; import java.util.List; - import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; import org.onap.policy.common.utils.validation.Assertions; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxModel.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxModel.java index e54b88078..9c71638fc 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxModel.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxModel.java @@ -24,7 +24,6 @@ package org.onap.policy.apex.model.basicmodel.concepts; import java.util.List; import java.util.Set; import java.util.TreeSet; - import javax.persistence.CascadeType; import javax.persistence.EmbeddedId; import javax.persistence.Entity; @@ -40,7 +39,6 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; import org.onap.policy.apex.model.basicmodel.handling.KeyInfoMarshalFilter; import org.onap.policy.apex.model.basicmodel.service.ModelService; @@ -212,9 +210,8 @@ public class AxModel extends AxConcept { result = validateArtifactKeyInModel((AxArtifactKey) axKey, artifactKeySet, result); } else if (axKey instanceof AxReferenceKey) { result = validateReferenceKeyInModel((AxReferenceKey) axKey, referenceKeySet, result); - } - // It must be an AxKeyUse, nothing else is legal - else { + } else { + // It must be an AxKeyUse, nothing else is legal usedKeySet.add((AxKeyUse) axKey); } } diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKey.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKey.java index 32fb76c99..4b9d647a9 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKey.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKey.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.model.basicmodel.concepts; import java.util.ArrayList; import java.util.List; - import javax.persistence.Column; import javax.persistence.Embeddable; import javax.xml.bind.annotation.XmlAccessType; @@ -31,7 +30,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; import org.onap.policy.common.utils.validation.Assertions; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/ApexDao.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/ApexDao.java index 655e9a99f..b84646038 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/ApexDao.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/ApexDao.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.basicmodel.dao; import java.util.Collection; import java.util.List; - import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/Uuid2String.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/Uuid2String.java index 37943ff56..f5fffdb00 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/Uuid2String.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/Uuid2String.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.model.basicmodel.dao.converters; import java.util.UUID; - import javax.persistence.AttributeConverter; import javax.persistence.Converter; import javax.xml.bind.annotation.adapters.XmlAdapter; @@ -42,8 +41,7 @@ public class Uuid2String extends XmlAdapter<String, UUID> implements AttributeCo String returnString; if (uuid == null) { returnString = ""; - } - else { + } else { returnString = uuid.toString(); } return returnString; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/impl/DefaultApexDao.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/impl/DefaultApexDao.java index b8a97928c..39e8b0def 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/impl/DefaultApexDao.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/impl/DefaultApexDao.java @@ -24,11 +24,9 @@ package org.onap.policy.apex.model.basicmodel.dao.impl; import java.util.Collection; import java.util.Collections; import java.util.List; - import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; - 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; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriter.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriter.java index aead4cb2b..04dd2a3f4 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriter.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriter.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.basicmodel.handling; import java.io.File; import java.io.FileOutputStream; - import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.slf4j.ext.XLogger; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReader.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReader.java index b593b3e9f..39eacce30 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReader.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReader.java @@ -28,7 +28,6 @@ import java.io.InputStreamReader; import java.io.StringReader; import java.net.URL; import java.util.regex.Pattern; - import javax.xml.XMLConstants; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBElement; @@ -37,7 +36,6 @@ import javax.xml.bind.Unmarshaller; import javax.xml.transform.stream.StreamSource; import javax.xml.validation.Schema; import javax.xml.validation.SchemaFactory; - import org.eclipse.persistence.jaxb.JAXBContextFactory; import org.eclipse.persistence.jaxb.MarshallerProperties; import org.eclipse.persistence.oxm.MediaType; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaver.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaver.java index 50e8bb5fa..8217badbc 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaver.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaver.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.basicmodel.handling; import java.io.File; - import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.onap.policy.common.utils.validation.Assertions; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriter.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriter.java index 91e58d663..f1725d8e3 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriter.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriter.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.basicmodel.handling; import java.io.ByteArrayOutputStream; - import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.common.utils.validation.Assertions; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriter.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriter.java index 8d6c01e4e..0dab08dcb 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriter.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriter.java @@ -26,7 +26,6 @@ import java.io.OutputStreamWriter; import java.io.Writer; import java.util.Set; import java.util.TreeSet; - import javax.xml.XMLConstants; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; @@ -40,7 +39,6 @@ import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; - import org.eclipse.persistence.jaxb.JAXBContextFactory; import org.eclipse.persistence.jaxb.MarshallerProperties; import org.eclipse.persistence.oxm.MediaType; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGenerator.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGenerator.java index a793a60d5..230a8abbb 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGenerator.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGenerator.java @@ -24,13 +24,11 @@ import java.io.File; import java.io.IOException; import java.io.PrintStream; import java.io.StringWriter; - import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.SchemaOutputResolver; import javax.xml.transform.Result; import javax.xml.transform.stream.StreamResult; - import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/KeyInfoMarshalFilter.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/KeyInfoMarshalFilter.java index 41cf4df89..cfc385d01 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/KeyInfoMarshalFilter.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/KeyInfoMarshalFilter.java @@ -89,7 +89,7 @@ public class KeyInfoMarshalFilter extends XmlAdapter<AxKeyInformation, AxKeyInfo */ @Override public AxKeyInformation marshal(AxKeyInformation val) throws Exception { - if (val == null || val.getKeyInfoMap() == null || val.getKeyInfoMap().isEmpty() || filterList.isEmpty() ) { + if (val == null || val.getKeyInfoMap() == null || val.getKeyInfoMap().isEmpty() || filterList.isEmpty()) { return val; } //create a new keyinfo clone to avoid removing keyinfo entries from the original model diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/ModelService.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/ModelService.java index 251d92af5..c6eb0e011 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/ModelService.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/ModelService.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.model.basicmodel.service; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; - import org.onap.policy.apex.model.basicmodel.concepts.ApexRuntimeException; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/TestApexModel.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/TestApexModel.java index 6bab169a8..bf63e6db7 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/TestApexModel.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/TestApexModel.java @@ -24,7 +24,6 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.net.URL; - import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapter.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapter.java index c70e51ab2..d8580be06 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapter.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapter.java @@ -21,12 +21,10 @@ package org.onap.policy.apex.model.basicmodel.xml; import java.io.Serializable; - import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.XmlAdapter; - import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; /** diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImplTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImplTest.java index b00e7db9f..37d3a9dd5 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImplTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImplTest.java @@ -28,7 +28,6 @@ import static org.junit.Assert.fail; import java.util.NavigableMap; import java.util.TreeMap; import java.util.TreeSet; - import org.junit.Test; /** @@ -47,10 +46,9 @@ public class AxConceptGetterImplTest { assertNull(getter.get(keyA)); try { - getter.get((String)null); + getter.get((String) null); fail("test should throw an exception here"); - } - catch (Exception getException) { + } catch (Exception getException) { assertEquals("conceptKeyName may not be null", getException.getMessage()); } @@ -72,15 +70,14 @@ public class AxConceptGetterImplTest { assertEquals(keyW002, getter.get("W")); try { - getter.get((String)null, "0.0.1"); + getter.get((String) null, "0.0.1"); fail("test should throw an exception here"); - } - catch (Exception getException) { + } catch (Exception getException) { assertEquals("conceptKeyName may not be null", getException.getMessage()); } assertEquals(keyW002, getter.get("W", "0.0.2")); - assertEquals(keyW002, getter.get("W", (String)null)); + assertEquals(keyW002, getter.get("W", (String) null)); assertEquals(new TreeSet<AxArtifactKey>(keyMap.values()), getter.getAll(null)); assertEquals(new TreeSet<AxArtifactKey>(keyMap.values()), getter.getAll(null, null)); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java index ee14a0606..0278f1672 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java @@ -28,11 +28,8 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.util.UUID; - import org.junit.Test; -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; + public class AxKeyInfoTest { @@ -66,7 +63,7 @@ public class AxKeyInfoTest { assertTrue(testKeyInfo.equals(testKeyInfo)); assertTrue(testKeyInfo.equals(clonedReferenceKey)); assertFalse(testKeyInfo.equals(null)); - assertFalse(testKeyInfo.equals((Object)new AxArtifactKey())); + assertFalse(testKeyInfo.equals((Object) new AxArtifactKey())); assertFalse(testKeyInfo.equals(new AxKeyInfo(new AxArtifactKey()))); assertFalse(testKeyInfo.equals(new AxKeyInfo(key, UUID.randomUUID(), "Some Description"))); assertFalse(testKeyInfo.equals(new AxKeyInfo(key, uuid, "Some Description"))); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java index 592933772..1467b77d1 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java @@ -125,9 +125,9 @@ public class AxKeyTest { assertTrue(nullKey0.isNullKey()); AxArtifactKey nullKey1 = new AxArtifactKey(); assertTrue(nullKey1.isNullKey()); - AxArtifactKey nullKey2 = new AxArtifactKey(AxKey.NULL_KEY_NAME,AxKey.NULL_KEY_VERSION); + AxArtifactKey nullKey2 = new AxArtifactKey(AxKey.NULL_KEY_NAME, AxKey.NULL_KEY_VERSION); assertTrue(nullKey2.isNullKey()); - AxArtifactKey notnullKey = new AxArtifactKey("Blah",AxKey.NULL_KEY_VERSION); + AxArtifactKey notnullKey = new AxArtifactKey("Blah", AxKey.NULL_KEY_VERSION); assertFalse(notnullKey.isNullKey()); } diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java index 061df61a5..55c444d97 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java @@ -28,11 +28,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import org.junit.Test; -import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxKey.Compatibility; -import org.onap.policy.apex.model.basicmodel.concepts.AxKeyUse; -import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; -import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; public class AxKeyUseTest { @@ -68,7 +64,7 @@ public class AxKeyUseTest { assertTrue(keyUse.equals(keyUse)); assertTrue(keyUse.equals(clonedKeyUse)); - assertFalse(keyUse.equals((Object)"Hello")); + assertFalse(keyUse.equals((Object) "Hello")); assertTrue(keyUse.equals(new AxKeyUse(key))); assertEquals(0, keyUse.compareTo(keyUse)); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java index 2745b95ac..27973b5b9 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java @@ -29,12 +29,8 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.lang.reflect.Field; - import org.junit.Test; -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; -import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; + public class AxReferenceKeyTest { @@ -93,7 +89,7 @@ public class AxReferenceKeyTest { assertTrue(testReferenceKey.equals(testReferenceKey)); assertTrue(testReferenceKey.equals(clonedReferenceKey)); - assertFalse(testReferenceKey.equals((Object)"Hello")); + assertFalse(testReferenceKey.equals((Object) "Hello")); assertFalse(testReferenceKey.equals(new AxReferenceKey("PKN", "0.0.2", "PLN", "LN"))); assertFalse(testReferenceKey.equals(new AxReferenceKey("NPKN", "0.0.2", "PLN", "LN"))); assertFalse(testReferenceKey.equals(new AxReferenceKey("NPKN", "0.0.1", "PLN", "LN"))); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/DummyEntity.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/DummyEntity.java index ff2bf9354..2407dab38 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/DummyEntity.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/DummyEntity.java @@ -23,13 +23,11 @@ package org.onap.policy.apex.model.basicmodel.concepts; import java.util.Arrays; import java.util.List; - import javax.persistence.EmbeddedId; import javax.persistence.Entity; import javax.persistence.Table; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - import org.onap.policy.apex.model.basicmodel.xml.AxReferenceKeyAdapter; @Entity diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ExceptionsTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ExceptionsTest.java index 0c62a0376..ff87bc2d0 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ExceptionsTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ExceptionsTest.java @@ -24,12 +24,8 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import java.io.IOException; - import org.junit.Test; -import org.onap.policy.apex.model.basicmodel.concepts.ApexConceptException; -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; + public class ExceptionsTest { diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ValidationTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ValidationTest.java index f2f99a811..21ae9b65c 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ValidationTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ValidationTest.java @@ -26,10 +26,6 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import org.junit.Test; -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.AxValidationMessage; -import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; public class ValidationTest { diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/DaoMiscTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/DaoMiscTest.java index 197c4b206..2b4cd5c30 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/DaoMiscTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/DaoMiscTest.java @@ -25,7 +25,6 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; import java.util.Properties; - import org.junit.Test; import org.onap.policy.apex.model.basicmodel.dao.converters.CDataConditioner; import org.onap.policy.apex.model.basicmodel.dao.converters.Uuid2String; diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java index 36b18d783..2c68c3987 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java @@ -31,7 +31,6 @@ import java.util.List; import java.util.Set; import java.util.TreeSet; import java.util.UUID; - import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelExceptionTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelExceptionTest.java index c74f33ccb..2571ea65b 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelExceptionTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelExceptionTest.java @@ -24,9 +24,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import java.io.IOException; - import org.junit.Test; -import org.onap.policy.apex.model.basicmodel.handling.ApexModelException; public class ApexModelExceptionTest { diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriterTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriterTest.java index 7c0ccc7d1..d6ff31e50 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriterTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriterTest.java @@ -25,11 +25,9 @@ import static org.junit.Assert.fail; import java.io.File; import java.io.IOException; - import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; -import org.onap.policy.apex.model.basicmodel.handling.ApexModelFileWriter; public class ApexModelFileWriterTest { @@ -82,16 +80,14 @@ public class ApexModelFileWriterTest { try { modelFileWriter.apexModelWriteJsonFile(model, AxModel.class, jsonTempFile.getAbsolutePath()); fail("this test should throw an exception here"); - } - catch (Exception e) { + } catch (Exception e) { assertTrue(e.getMessage().contains("could not create directory ")); } try { modelFileWriter.apexModelWriteXmlFile(model, AxModel.class, jsonTempFile.getAbsolutePath()); fail("this test should throw an exception here"); - } - catch (Exception e) { + } catch (Exception e) { assertTrue(e.getMessage().contains("could not create directory ")); } @@ -108,16 +104,14 @@ public class ApexModelFileWriterTest { try { modelFileWriter.apexModelWriteJsonFile(model, AxModel.class, jsonTempFile.getAbsolutePath()); fail("this test should throw an exception here"); - } - catch (Exception e) { + } catch (Exception e) { assertTrue(e.getMessage().contains("error processing file ")); } try { modelFileWriter.apexModelWriteXmlFile(model, AxModel.class, jsonTempFile.getAbsolutePath()); fail("this test should throw an exception here"); - } - catch (Exception e) { + } catch (Exception e) { assertTrue(e.getMessage().contains("error processing file ")); } diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java index d560f62fe..7f2f813d8 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java @@ -33,20 +33,16 @@ import java.io.FileInputStream; import java.io.FileReader; import java.io.IOException; import java.lang.reflect.Field; - import javax.xml.bind.JAXBException; import javax.xml.bind.PropertyException; import javax.xml.bind.Unmarshaller; import javax.xml.transform.stream.StreamSource; - import org.junit.Test; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; -import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader; -import org.onap.policy.apex.model.basicmodel.handling.ApexModelWriter; public class ApexModelReaderTest { @Mock @@ -81,8 +77,7 @@ public class ApexModelReaderTest { try { modelReader.read(baisInvalid); fail("test should throw an exceptino here"); - } - catch (Exception e) { + } catch (Exception e) { assertTrue(e.getMessage().startsWith("Apex concept validation failed")); } @@ -107,8 +102,7 @@ public class ApexModelReaderTest { try { modelReader.read(baisDummy); fail("test should throw an exception here"); - } - catch (Exception e) { + } catch (Exception e) { assertEquals("format of input for Apex concept is neither JSON nor XML", e.getMessage()); } @@ -116,8 +110,7 @@ public class ApexModelReaderTest { ByteArrayInputStream nullBais = null; modelReader.read(nullBais); fail("test should throw an exception here"); - } - catch (Exception e) { + } catch (Exception e) { assertEquals("concept stream may not be null", e.getMessage()); } @@ -125,8 +118,7 @@ public class ApexModelReaderTest { FileInputStream fis = new FileInputStream(new File("somewhere/over/the/rainbow")); modelReader.read(fis); fail("test should throw an exception here"); - } - catch (Exception e) { + } catch (Exception e) { assertTrue(e.getMessage().contains("rainbow")); } @@ -136,11 +128,9 @@ public class ApexModelReaderTest { br.close(); modelReader.read(br); fail("test should throw an exception here"); - } - catch (Exception e) { + } catch (Exception e) { assertEquals("Unable to read Apex concept ", e.getMessage()); - } - finally { + } finally { tempFile.delete(); } @@ -150,11 +140,9 @@ public class ApexModelReaderTest { try { modelReader.setSchema(tempFile.getCanonicalPath()); fail("test should throw an exception here"); - } - catch (Exception e) { + } catch (Exception e) { assertEquals("Unable to load schema", e.getMessage()); - } - finally { + } finally { tempFile.delete(); } @@ -178,7 +166,7 @@ public class ApexModelReaderTest { try { Mockito.doThrow(new JAXBException("Exception marshalling to JSON")).when(unmarshallerMock) - .unmarshal((StreamSource)Mockito.anyObject(), Mockito.anyObject()); + .unmarshal((StreamSource) Mockito.anyObject(), Mockito.anyObject()); modelReader.read("{Hello}"); fail("Test should throw an exception here"); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaverTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaverTest.java index 65640916a..21be88377 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaverTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaverTest.java @@ -24,11 +24,9 @@ import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; - import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; -import org.onap.policy.apex.model.basicmodel.handling.ApexModelSaver; public class ApexModelSaverTest { diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriterTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriterTest.java index 22271dda3..cad4e05f3 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriterTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriterTest.java @@ -26,12 +26,10 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.io.IOException; - import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; -import org.onap.policy.apex.model.basicmodel.handling.ApexModelStringWriter; public class ApexModelStringWriterTest { @@ -61,32 +59,28 @@ public class ApexModelStringWriterTest { try { stringWriter.writeString(null, AxKeyInfo.class, true); fail("test should thrown an exception here"); - } - catch (Exception e) { + } catch (Exception e) { assertEquals("concept may not be null", e.getMessage()); } try { stringWriter.writeString(null, AxKeyInfo.class, false); fail("test should thrown an exception here"); - } - catch (Exception e) { + } catch (Exception e) { assertEquals("concept may not be null", e.getMessage()); } try { stringWriter.writeJsonString(null, AxKeyInfo.class); fail("test should thrown an exception here"); - } - catch (Exception e) { + } catch (Exception e) { assertEquals("error writing JSON string", e.getMessage()); } try { stringWriter.writeXmlString(null, AxKeyInfo.class); fail("test should thrown an exception here"); - } - catch (Exception e) { + } catch (Exception e) { assertEquals("error writing XML string", e.getMessage()); } diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java index d25e191a8..1b8461c4e 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java @@ -29,18 +29,15 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.Writer; import java.lang.reflect.Field; - import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; import javax.xml.bind.PropertyException; - import org.junit.Test; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; -import org.onap.policy.apex.model.basicmodel.handling.ApexModelWriter; import org.w3c.dom.Document; public class ApexModelWriterTest { @@ -159,7 +156,7 @@ public class ApexModelWriterTest { AxModel model = new DummyApexBasicModelCreator().getModel(); Mockito.doThrow(new JAXBException("Exception marshalling to JSON")).when(marshallerMock) - .marshal((AxModel)Mockito.anyObject(), (Writer)Mockito.anyObject()); + .marshal((AxModel) Mockito.anyObject(), (Writer) Mockito.anyObject()); modelWriter.write(model, baos); fail("Test should throw an exception here"); @@ -192,7 +189,7 @@ public class ApexModelWriterTest { AxModel model = new DummyApexBasicModelCreator().getModel(); Mockito.doThrow(new JAXBException("Exception marshalling to JSON")).when(marshallerMock) - .marshal((AxModel)Mockito.anyObject(), (Document)Mockito.anyObject()); + .marshal((AxModel) Mockito.anyObject(), (Document) Mockito.anyObject()); modelWriter.write(model, baos); fail("Test should throw an exception here"); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java index e7388b7e9..0b18abcb1 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java @@ -28,7 +28,6 @@ import java.io.FileDescriptor; import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintStream; - import org.junit.Test; public class ApexSchemaGeneratorTest { diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyApexBasicModelCreator.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyApexBasicModelCreator.java index d04d3a441..353722b2d 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyApexBasicModelCreator.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyApexBasicModelCreator.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.model.basicmodel.handling; 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.AxKeyInformation; diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyAxModelWithReferences.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyAxModelWithReferences.java index e0fe60337..887755d03 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyAxModelWithReferences.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyAxModelWithReferences.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.basicmodel.handling; import java.util.ArrayList; import java.util.List; - 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.AxModel; @@ -56,7 +55,7 @@ public class DummyAxModelWithReferences extends AxModel { List<AxKey> keys = super.getKeys(); for (AxKey key: keys) { - AxArtifactKey akey = (AxArtifactKey)key; + AxArtifactKey akey = (AxArtifactKey) key; AxReferenceKey keyRef = new AxReferenceKey(akey, akey.getName()); extrakeyList.add(keyRef); } diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java index af0ef5f3c..c666dd667 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java @@ -29,7 +29,6 @@ import static org.junit.Assert.assertTrue; import java.util.List; import java.util.Set; - import org.junit.Before; import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; @@ -74,7 +73,7 @@ public class SupportApexBasicModelConceptsTester { assertTrue(model.equals(model)); assertTrue(model.equals(clonedModel)); assertFalse(model.equals(null)); - assertFalse(model.equals((Object)"Hello")); + assertFalse(model.equals((Object) "Hello")); clonedModel.getKey().setVersion("0.0.2"); assertFalse(model.equals(clonedModel)); clonedModel.getKey().setVersion("0.0.1"); @@ -96,7 +95,7 @@ public class SupportApexBasicModelConceptsTester { final AxKeyInformation clonedKeyI = new AxKeyInformation(keyI); assertFalse(keyI.equals(null)); - assertFalse(keyI.equals((Object)new AxArtifactKey())); + assertFalse(keyI.equals((Object) new AxArtifactKey())); assertTrue(keyI.equals(clonedKeyI)); clonedKeyI.setKey(new AxArtifactKey()); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexModelCreator1.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexModelCreator1.java index 123125bb1..9ad34a38c 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexModelCreator1.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexModelCreator1.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.model.basicmodel.handling; 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.AxKeyInformation; diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportConceptGetterTester.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportConceptGetterTester.java index bed65c6e7..2120b984d 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportConceptGetterTester.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportConceptGetterTester.java @@ -28,14 +28,11 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.UUID; - import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.ApexException; 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.AxModel; -import org.onap.policy.apex.model.basicmodel.handling.ApexModelFileWriter; -import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader; public class SupportConceptGetterTester { diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapterTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapterTest.java index 2befe3336..12a67c803 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapterTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapterTest.java @@ -25,7 +25,6 @@ import static org.junit.Assert.assertNotNull; import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; -import org.onap.policy.apex.model.basicmodel.xml.AxReferenceKeyAdapter; public class AxReferenceKeyAdapterTest { @@ -38,6 +37,6 @@ public class AxReferenceKeyAdapterTest { String rkeyString = arka.marshal(rkey); assertEquals("LN", rkeyString); - assertEquals(rkey.getLocalName(),arka.unmarshal(rkeyString).getLocalName()); + assertEquals(rkey.getLocalName(), arka.unmarshal(rkeyString).getLocalName()); } } diff --git a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbums.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbums.java index cbd923b6c..a28fbf663 100644 --- a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbums.java +++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbums.java @@ -27,7 +27,6 @@ import java.util.Map.Entry; import java.util.NavigableMap; import java.util.Set; import java.util.TreeMap; - import javax.persistence.CascadeType; import javax.persistence.EmbeddedId; import javax.persistence.Entity; @@ -40,7 +39,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter; diff --git a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java index 17629605e..4ddfb7175 100644 --- a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java +++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.contextmodel.concepts; import java.util.List; - import javax.persistence.Column; import javax.persistence.Convert; import javax.persistence.EmbeddedId; @@ -34,7 +33,6 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; diff --git a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchemas.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchemas.java index 5bd0c1f5e..a0f031450 100644 --- a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchemas.java +++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchemas.java @@ -27,7 +27,6 @@ import java.util.Map.Entry; import java.util.NavigableMap; import java.util.Set; import java.util.TreeMap; - import javax.persistence.CascadeType; import javax.persistence.EmbeddedId; import javax.persistence.Entity; @@ -40,7 +39,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter; diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java index d0d994a05..597aa3914 100644 --- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java +++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java @@ -32,8 +32,6 @@ import org.junit.Test; 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.concepts.AxValidationResult.ValidationResult; -import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum; -import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbums; /** * Context album tests. @@ -126,7 +124,7 @@ public class ContextAlbumsTest { assertTrue(album.equals(album)); assertTrue(album.equals(clonedAlbum)); assertFalse(album.equals(null)); - assertFalse(album.equals((Object)"Hello")); + assertFalse(album.equals((Object) "Hello")); assertFalse(album.equals(new AxContextAlbum(new AxArtifactKey(), "Scope", false, AxArtifactKey.getNullKey()))); assertFalse(album.equals(new AxContextAlbum(newKey, "Scope", false, AxArtifactKey.getNullKey()))); assertFalse(album.equals(new AxContextAlbum(newKey, "NewAlbumScope", false, AxArtifactKey.getNullKey()))); @@ -193,7 +191,7 @@ public class ContextAlbumsTest { assertTrue(albums.equals(albums)); assertTrue(albums.equals(clonedAlbums)); assertFalse(albums.equals(null)); - assertFalse(albums.equals((Object)"Hello")); + assertFalse(albums.equals((Object) "Hello")); assertFalse(albums.equals(new AxContextAlbums(new AxArtifactKey()))); assertEquals(0, albums.compareTo(albums)); diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java index d2a4bc53a..cac922cc4 100644 --- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java +++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java @@ -30,9 +30,6 @@ import static org.junit.Assert.assertTrue; import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation; -import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbums; -import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel; -import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas; /** * Context model tests. @@ -67,7 +64,7 @@ public class ContextModelTest { assertTrue(model.equals(model)); assertTrue(model.equals(clonedModel)); - assertFalse(model.equals((Object)"Hello")); + assertFalse(model.equals((Object) "Hello")); assertFalse(model.equals(new AxContextModel(new AxArtifactKey()))); assertFalse(model.equals(new AxContextModel(new AxArtifactKey(), new AxContextSchemas(), new AxContextAlbums(), new AxKeyInformation()))); diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java index 73f4c3086..d72806a19 100644 --- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java +++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java @@ -31,8 +31,6 @@ import org.junit.Test; 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.concepts.AxValidationResult.ValidationResult; -import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema; -import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas; /** * Context schema tests. diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ContextComparisonTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ContextComparisonTest.java index 81609cacf..53e43a80a 100644 --- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ContextComparisonTest.java +++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ContextComparisonTest.java @@ -29,7 +29,6 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum; import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel; import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema; -import org.onap.policy.apex.model.contextmodel.handling.ContextComparer; import org.onap.policy.apex.model.utilities.comparison.KeyedMapDifference; /** diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModelCreator.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModelCreator.java index 4e8d8d5a9..3fe7e3aa2 100644 --- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModelCreator.java +++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModelCreator.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.model.contextmodel.handling; 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.AxKeyInformation; diff --git a/model/engine-model/src/main/java/org/onap/policy/apex/model/enginemodel/concepts/AxEngineModel.java b/model/engine-model/src/main/java/org/onap/policy/apex/model/enginemodel/concepts/AxEngineModel.java index 79c5d89d6..3524f1290 100644 --- a/model/engine-model/src/main/java/org/onap/policy/apex/model/enginemodel/concepts/AxEngineModel.java +++ b/model/engine-model/src/main/java/org/onap/policy/apex/model/enginemodel/concepts/AxEngineModel.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.model.enginemodel.concepts; import java.text.SimpleDateFormat; import java.util.List; - import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Enumerated; @@ -35,7 +34,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; diff --git a/model/engine-model/src/main/java/org/onap/policy/apex/model/enginemodel/concepts/AxEngineStats.java b/model/engine-model/src/main/java/org/onap/policy/apex/model/enginemodel/concepts/AxEngineStats.java index db6209af0..916525900 100644 --- a/model/engine-model/src/main/java/org/onap/policy/apex/model/enginemodel/concepts/AxEngineStats.java +++ b/model/engine-model/src/main/java/org/onap/policy/apex/model/enginemodel/concepts/AxEngineStats.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.model.enginemodel.concepts; import java.text.SimpleDateFormat; import java.util.List; - import javax.persistence.Column; import javax.persistence.EmbeddedId; import javax.persistence.Entity; @@ -34,9 +33,7 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - import lombok.Getter; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; diff --git a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java index fe834b43e..d0694ec30 100644 --- a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java +++ b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java @@ -116,7 +116,7 @@ public class EngineModelTest { assertTrue(model.equals(model)); assertTrue(model.equals(clonedModel)); - assertFalse(model.equals((Object)"Hello")); + assertFalse(model.equals((Object) "Hello")); assertFalse(model.equals(new AxEngineModel(new AxArtifactKey()))); assertFalse(model.equals(new AxEngineModel(new AxArtifactKey(), new AxContextSchemas(schemasKey), new AxKeyInformation(keyInfoKey), new AxContextAlbums(albumKey), AxEngineState.READY, stats))); diff --git a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/DummyTestApexEngineModelCreator.java b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/DummyTestApexEngineModelCreator.java index fa79f8921..9e7d99b72 100644 --- a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/DummyTestApexEngineModelCreator.java +++ b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/DummyTestApexEngineModelCreator.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.model.enginemodel.handling; 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.AxReferenceKey; diff --git a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvent.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvent.java index 5a7550c03..26e21aed7 100644 --- a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvent.java +++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvent.java @@ -28,7 +28,6 @@ import java.util.Set; import java.util.SortedMap; import java.util.TreeMap; import java.util.TreeSet; - import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.EmbeddedId; @@ -41,7 +40,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; diff --git a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEventModel.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEventModel.java index 6c8ce15f1..f4938dcea 100644 --- a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEventModel.java +++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEventModel.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.eventmodel.concepts; import java.util.List; - import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.JoinColumn; @@ -34,7 +33,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; diff --git a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvents.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvents.java index 3d0d9b7f2..2df7dee07 100644 --- a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvents.java +++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvents.java @@ -27,7 +27,6 @@ import java.util.Map.Entry; import java.util.NavigableMap; import java.util.Set; import java.util.TreeMap; - import javax.persistence.CascadeType; import javax.persistence.EmbeddedId; import javax.persistence.Entity; @@ -40,7 +39,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter; diff --git a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxField.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxField.java index c3f9d3329..a1d6a8ba1 100644 --- a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxField.java +++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxField.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.eventmodel.concepts; import java.util.List; - import javax.persistence.AttributeOverride; import javax.persistence.AttributeOverrides; import javax.persistence.Column; @@ -38,7 +37,6 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java index 99d377261..3ae5ac267 100644 --- a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java +++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java @@ -31,8 +31,6 @@ import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation; import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas; -import org.onap.policy.apex.model.eventmodel.concepts.AxEventModel; -import org.onap.policy.apex.model.eventmodel.concepts.AxEvents; /** * Test event models. @@ -65,7 +63,7 @@ public class EventModelTest { assertTrue(model.equals(model)); assertTrue(model.equals(clonedModel)); - assertFalse(model.equals((Object)"Hello")); + assertFalse(model.equals((Object) "Hello")); assertFalse(model.equals(new AxEventModel(new AxArtifactKey()))); assertFalse(model.equals(new AxEventModel(modelKey, new AxContextSchemas(), new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey)))); diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java index b9b643e47..a82be12be 100644 --- a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java +++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java @@ -29,16 +29,12 @@ import static org.junit.Assert.assertTrue; import java.util.TreeMap; import java.util.TreeSet; - import org.junit.Test; 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; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; -import org.onap.policy.apex.model.eventmodel.concepts.AxEvent; -import org.onap.policy.apex.model.eventmodel.concepts.AxEvents; -import org.onap.policy.apex.model.eventmodel.concepts.AxField; /** * Test events. @@ -195,7 +191,7 @@ public class EventsTest { assertTrue(event.equals(event)); assertTrue(event.equals(clonedEvent)); assertFalse(event.equals(null)); - assertFalse(event.equals((Object)"Hello")); + assertFalse(event.equals((Object) "Hello")); assertFalse( event.equals(new AxEvent(AxArtifactKey.getNullKey(), "namespace", "source", "target", parameterMap))); assertFalse(event.equals(new AxEvent(eventKey, "namespace1", "source", "target", parameterMap))); @@ -278,7 +274,7 @@ public class EventsTest { assertTrue(events.equals(events)); assertTrue(events.equals(clonedEvents)); assertFalse(events.equals(null)); - assertFalse(events.equals((Object)"Hello")); + assertFalse(events.equals((Object) "Hello")); assertFalse(events.equals(new AxEvents(new AxArtifactKey()))); assertEquals(0, events.compareTo(events)); diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java index fe3c9e6b7..a2587b503 100644 --- a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java +++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java @@ -32,9 +32,6 @@ 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; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; -import org.onap.policy.apex.model.eventmodel.concepts.AxField; -import org.onap.policy.apex.model.eventmodel.concepts.AxInputField; -import org.onap.policy.apex.model.eventmodel.concepts.AxOutputField; /** * Test fields. @@ -118,7 +115,7 @@ public class FieldTest { assertTrue(field.equals(field)); assertTrue(field.equals(clonedField)); assertFalse(field.equals(null)); - assertFalse(field.equals((Object)"Hello")); + assertFalse(field.equals((Object) "Hello")); assertFalse(field.equals(new AxField(AxReferenceKey.getNullKey(), AxArtifactKey.getNullKey(), false))); assertFalse(field.equals(new AxField(fieldKey, AxArtifactKey.getNullKey(), false))); assertFalse(field.equals(new AxField(fieldKey, schemaKey, false))); 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; diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxLogic.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxLogic.java index f7680a772..64aeb3777 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxLogic.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxLogic.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.policymodel.concepts; import java.util.List; - import javax.persistence.Column; import javax.persistence.Convert; import javax.persistence.EmbeddedId; @@ -36,7 +35,6 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicies.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicies.java index d6a7efb71..f3e89a4e0 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicies.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicies.java @@ -27,7 +27,6 @@ import java.util.Map.Entry; import java.util.NavigableMap; import java.util.Set; import java.util.TreeMap; - import javax.persistence.CascadeType; import javax.persistence.EmbeddedId; import javax.persistence.Entity; @@ -40,7 +39,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter; diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicy.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicy.java index 8157d91d4..502ec3a60 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicy.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicy.java @@ -27,7 +27,6 @@ import java.util.Map.Entry; import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; - import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.EmbeddedId; @@ -41,7 +40,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicyModel.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicyModel.java index 3ad08a132..7b7dba800 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicyModel.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxPolicyModel.java @@ -140,7 +140,7 @@ public class AxPolicyModel extends AxModel { @OneToOne(cascade = CascadeType.ALL) @JoinColumns({@JoinColumn(name = "albumsName", referencedColumnName = "name"), @JoinColumn(name = "albumsVersion", referencedColumnName = "version")}) - @XmlElement(name = "albums", required = false ) + @XmlElement(name = "albums", required = false) @XmlJavaTypeAdapter(EmptyAlbumsAdapter.class) private AxContextAlbums albums; diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxState.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxState.java index f94cb2ef4..713e4de79 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxState.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxState.java @@ -28,7 +28,6 @@ import java.util.Map.Entry; import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; - import javax.persistence.AttributeOverride; import javax.persistence.AttributeOverrides; import javax.persistence.CascadeType; @@ -49,7 +48,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateFinalizerLogic.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateFinalizerLogic.java index d8ab0ce77..0b5d9751e 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateFinalizerLogic.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateFinalizerLogic.java @@ -28,7 +28,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; /** diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateOutput.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateOutput.java index 34c8f2f2d..87caf03a2 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateOutput.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateOutput.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.policymodel.concepts; import java.util.List; - import javax.persistence.AttributeOverride; import javax.persistence.AttributeOverrides; import javax.persistence.Column; @@ -35,7 +34,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateParamsBuilder.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateParamsBuilder.java index 3f5e4e8df..6ef6e0b0a 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateParamsBuilder.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateParamsBuilder.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.policymodel.concepts; import java.util.Map; import java.util.Set; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTaskReference.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTaskReference.java index 748abdbe1..a3cb9e647 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTaskReference.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTaskReference.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.policymodel.concepts; import java.util.List; - import javax.persistence.AttributeOverride; import javax.persistence.AttributeOverrides; import javax.persistence.Column; @@ -36,7 +35,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTree.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTree.java index e3120db29..cd21742a4 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTree.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxStateTree.java @@ -26,7 +26,6 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import java.util.TreeSet; - import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; import org.onap.policy.common.utils.validation.Assertions; diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java index 31545b3f2..a0aa705b5 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTask.java @@ -27,7 +27,6 @@ import java.util.Map.Entry; import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; - import javax.persistence.CascadeType; import javax.persistence.CollectionTable; import javax.persistence.ElementCollection; @@ -43,7 +42,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTaskLogic.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTaskLogic.java index 30f37ffe2..70b19ec48 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTaskLogic.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTaskLogic.java @@ -28,7 +28,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTaskParameter.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTaskParameter.java index 95b8ff0cf..47c62e6ae 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTaskParameter.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTaskParameter.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.policymodel.concepts; import java.util.List; - import javax.persistence.Column; import javax.persistence.EmbeddedId; import javax.persistence.Entity; @@ -32,7 +31,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTaskSelectionLogic.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTaskSelectionLogic.java index 32d8ef3b3..5d6441a4d 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTaskSelectionLogic.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTaskSelectionLogic.java @@ -28,7 +28,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; /** diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTasks.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTasks.java index b53159ce3..4d9dd2089 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTasks.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxTasks.java @@ -27,7 +27,6 @@ import java.util.Map.Entry; import java.util.NavigableMap; import java.util.Set; import java.util.TreeMap; - import javax.persistence.CascadeType; import javax.persistence.EmbeddedId; import javax.persistence.Entity; @@ -40,7 +39,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter; diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyser.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyser.java index d40e66ead..4d076cfda 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyser.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyser.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.model.policymodel.handling; import java.util.Map.Entry; import java.util.Set; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum; diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalysisResult.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalysisResult.java index a5fbc09a2..7da262c90 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalysisResult.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalysisResult.java @@ -25,7 +25,6 @@ import java.util.Map.Entry; import java.util.Set; import java.util.TreeMap; 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.contextmodel.concepts.AxContextAlbum; diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitter.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitter.java index b11158cf6..1f1c27a83 100644 --- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitter.java +++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitter.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.model.policymodel.handling; import java.util.Collection; 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.AxValidationResult; import org.onap.policy.apex.model.basicmodel.handling.ApexModelException; diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/DummyLogicReader.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/DummyLogicReader.java index 422f923d2..42f2fc754 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/DummyLogicReader.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/DummyLogicReader.java @@ -20,7 +20,6 @@ package org.onap.policy.apex.model.policymodel.concepts; -import org.onap.policy.apex.model.policymodel.concepts.AxLogic; import org.onap.policy.apex.model.policymodel.concepts.AxLogicReader; public class DummyLogicReader implements AxLogicReader { diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/ExceptionsTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/ExceptionsTest.java index 70c79a1ef..0afb48b3c 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/ExceptionsTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/ExceptionsTest.java @@ -24,10 +24,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import java.io.IOException; - import org.junit.Test; -import org.onap.policy.apex.model.policymodel.concepts.PolicyException; -import org.onap.policy.apex.model.policymodel.concepts.PolicyRuntimeException; /** * Test model exceptions. diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java index f9f424880..d3d533400 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java @@ -33,10 +33,6 @@ 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; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; -import org.onap.policy.apex.model.policymodel.concepts.AxLogic; -import org.onap.policy.apex.model.policymodel.concepts.AxStateFinalizerLogic; -import org.onap.policy.apex.model.policymodel.concepts.AxTaskLogic; -import org.onap.policy.apex.model.policymodel.concepts.AxTaskSelectionLogic; /** * Test apex logic. @@ -163,7 +159,7 @@ public class LogicTest { assertTrue(logic.equals(logic)); assertTrue(logic.equals(clonedLogic)); assertFalse(logic.equals(null)); - assertFalse(logic.equals((Object)"Hello")); + assertFalse(logic.equals((Object) "Hello")); assertFalse(logic.equals(new AxLogic(AxReferenceKey.getNullKey(), "LogicFlavour", "Logic"))); assertFalse(logic.equals(new AxLogic(logicKey, "AnotherLogicFlavour", "Logic"))); assertFalse(logic.equals(new AxLogic(logicKey, "LogicFlavour", "AnotherLogic"))); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java index 1974413ff..28121fce6 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java @@ -30,18 +30,12 @@ import static org.junit.Assert.fail; import java.util.Map; import java.util.TreeMap; - import org.junit.Test; 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; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; -import org.onap.policy.apex.model.policymodel.concepts.AxPolicies; -import org.onap.policy.apex.model.policymodel.concepts.AxPolicy; -import org.onap.policy.apex.model.policymodel.concepts.AxState; -import org.onap.policy.apex.model.policymodel.concepts.AxStateOutput; -import org.onap.policy.apex.model.policymodel.concepts.AxStateTree; import org.onap.policy.apex.model.policymodel.handling.SupportApexPolicyModelCreator; /** @@ -241,7 +235,7 @@ public class PoliciesTest { assertTrue(policy.equals(policy)); assertTrue(policy.equals(clonedPolicy)); assertFalse(policy.equals(null)); - assertFalse(policy.equals((Object)"Hello")); + assertFalse(policy.equals((Object) "Hello")); assertFalse(policy.equals( new AxPolicy(AxArtifactKey.getNullKey(), savedTemplate, savedStateMap, savedFirstState))); assertFalse(policy.equals(new AxPolicy(savedPolicyKey, "SomeTemplate", savedStateMap, savedFirstState))); @@ -325,7 +319,7 @@ public class PoliciesTest { assertTrue(policies.equals(policies)); assertTrue(policies.equals(clonedPolicies)); assertFalse(policies.equals(null)); - assertFalse(policies.equals((Object)"Hello")); + assertFalse(policies.equals((Object) "Hello")); assertFalse(policies.equals(new AxPolicies(new AxArtifactKey()))); assertEquals(0, policies.compareTo(policies)); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java index d2c6b1bdb..820f2d1e6 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java @@ -40,13 +40,6 @@ import org.onap.policy.apex.model.eventmodel.concepts.AxEvents; import org.onap.policy.apex.model.eventmodel.concepts.AxField; import org.onap.policy.apex.model.eventmodel.concepts.AxInputField; import org.onap.policy.apex.model.eventmodel.concepts.AxOutputField; -import org.onap.policy.apex.model.policymodel.concepts.AxPolicies; -import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; -import org.onap.policy.apex.model.policymodel.concepts.AxStateOutput; -import org.onap.policy.apex.model.policymodel.concepts.AxStateTaskOutputType; -import org.onap.policy.apex.model.policymodel.concepts.AxStateTaskReference; -import org.onap.policy.apex.model.policymodel.concepts.AxTaskSelectionLogic; -import org.onap.policy.apex.model.policymodel.concepts.AxTasks; import org.onap.policy.apex.model.policymodel.handling.SupportApexPolicyModelCreator; /** @@ -90,7 +83,7 @@ public class PolicyModelTest { assertTrue(model.equals(model)); assertTrue(model.equals(clonedModel)); - assertFalse(model.equals((Object)"Hello")); + assertFalse(model.equals((Object) "Hello")); assertFalse(model.equals(new AxPolicyModel(new AxArtifactKey()))); assertFalse(model.equals(new AxPolicyModel(AxArtifactKey.getNullKey(), new AxContextSchemas(schemasKey), new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey), new AxContextAlbums(albumsKey), diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateOutputTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateOutputTest.java index 7d1826bd0..307a746e5 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateOutputTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateOutputTest.java @@ -33,7 +33,6 @@ 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; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; -import org.onap.policy.apex.model.policymodel.concepts.AxStateOutput; /** * Test state outputs. @@ -120,7 +119,7 @@ public class StateOutputTest { assertTrue(so.equals(so)); assertTrue(so.equals(clonedPar)); assertFalse(so.equals(null)); - assertFalse(so.equals((Object)"Hello")); + assertFalse(so.equals((Object) "Hello")); assertFalse(so.equals(new AxStateOutput(AxReferenceKey.getNullKey(), eKey, nsKey))); assertFalse(so.equals(new AxStateOutput(soKey, new AxArtifactKey(), nsKey))); assertFalse(so.equals(new AxStateOutput(soKey, eKey, new AxReferenceKey()))); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTaskReferenceTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTaskReferenceTest.java index b37d49030..87e896155 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTaskReferenceTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTaskReferenceTest.java @@ -33,8 +33,6 @@ 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; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; -import org.onap.policy.apex.model.policymodel.concepts.AxStateTaskOutputType; -import org.onap.policy.apex.model.policymodel.concepts.AxStateTaskReference; /** * Test state task references. @@ -136,7 +134,7 @@ public class StateTaskReferenceTest { assertTrue(stRef.equals(stRef)); assertTrue(stRef.equals(clonedStRef)); assertFalse(stRef.equals(null)); - assertFalse(stRef.equals((Object)"Hello")); + assertFalse(stRef.equals((Object) "Hello")); assertFalse(stRef.equals( new AxStateTaskReference(AxReferenceKey.getNullKey(), AxStateTaskOutputType.LOGIC, soKey))); assertFalse(stRef.equals(new AxStateTaskReference(stRefKey, AxStateTaskOutputType.DIRECT, soKey))); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTest.java index 1f71e9ec0..adcc040b7 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTest.java @@ -30,7 +30,6 @@ import static org.junit.Assert.fail; import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; - import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; @@ -429,7 +428,7 @@ public class StateTest { assertTrue(state.equals(state)); assertTrue(state.equals(clonedState)); assertFalse(state.equals(null)); - assertFalse(state.equals((Object)"Hello")); + assertFalse(state.equals((Object) "Hello")); assertFalse(state.equals(new AxState(new AxStateParamsBuilder().key(new AxReferenceKey()).trigger(triggerKey) .stateOutputs(soMap).contextAlbumReferenceSet(ctxtSet).taskSelectionLogic(tsl) .stateFinalizerLogicMap(sflMap).defaultTask(defTaskKey).taskReferenceMap(trMap)))); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TaskParameterTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TaskParameterTest.java index fe059724f..0fc08d436 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TaskParameterTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TaskParameterTest.java @@ -33,7 +33,6 @@ 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; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; -import org.onap.policy.apex.model.policymodel.concepts.AxTaskParameter; /** * Test task parameters. @@ -100,7 +99,7 @@ public class TaskParameterTest { assertTrue(par.equals(par)); assertTrue(par.equals(clonedPar)); assertFalse(par.equals(null)); - assertFalse(par.equals((Object)"Hello")); + assertFalse(par.equals((Object) "Hello")); assertFalse(par.equals(new AxTaskParameter(AxReferenceKey.getNullKey(), "DefaultValue"))); assertFalse(par.equals(new AxTaskParameter(parKey, "OtherDefaultValue"))); assertTrue(par.equals(new AxTaskParameter(parKey, "DefaultValue"))); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java index 1041d4219..9089e1837 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java @@ -29,7 +29,6 @@ import static org.junit.Assert.assertTrue; import java.util.TreeMap; import java.util.TreeSet; - import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; @@ -38,10 +37,6 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.Validat import org.onap.policy.apex.model.eventmodel.concepts.AxField; import org.onap.policy.apex.model.eventmodel.concepts.AxInputField; import org.onap.policy.apex.model.eventmodel.concepts.AxOutputField; -import org.onap.policy.apex.model.policymodel.concepts.AxTask; -import org.onap.policy.apex.model.policymodel.concepts.AxTaskLogic; -import org.onap.policy.apex.model.policymodel.concepts.AxTaskParameter; -import org.onap.policy.apex.model.policymodel.concepts.AxTasks; /** * Test policy tasks. @@ -229,7 +224,7 @@ public class TasksTest { assertTrue(task.equals(task)); assertTrue(task.equals(clonedTask)); assertFalse(task.equals(null)); - assertFalse(task.equals((Object)"Hello")); + assertFalse(task.equals((Object) "Hello")); assertFalse(task.equals(new AxTask(new AxArtifactKey(), ifMap, ofMap, tpMap, ctxtSet, tl))); assertFalse(task.equals(new AxTask(taskKey, ifEmptyMap, ofMap, tpMap, ctxtSet, tl))); assertFalse(task.equals(new AxTask(taskKey, ifMap, ofEmptyMap, tpMap, ctxtSet, tl))); @@ -312,7 +307,7 @@ public class TasksTest { assertTrue(tasks.equals(tasks)); assertTrue(tasks.equals(clonedTasks)); assertFalse(tasks.equals(null)); - assertFalse(tasks.equals((Object)"Hello")); + assertFalse(tasks.equals((Object) "Hello")); assertFalse(tasks.equals(new AxTasks(new AxArtifactKey()))); assertEquals(0, tasks.compareTo(tasks)); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java index d4ab6bd7b..046f5af22 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java @@ -25,8 +25,6 @@ import static org.junit.Assert.assertTrue; import org.junit.Test; import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; -import org.onap.policy.apex.model.policymodel.handling.PolicyAnalyser; -import org.onap.policy.apex.model.policymodel.handling.PolicyAnalysisResult; public class PolicyAnalyserTest { @Test diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyLogicReaderTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyLogicReaderTest.java index 23f9d3820..ebb6d9765 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyLogicReaderTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyLogicReaderTest.java @@ -28,7 +28,6 @@ import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; import org.onap.policy.apex.model.policymodel.concepts.AxLogic; -import org.onap.policy.apex.model.policymodel.handling.PolicyLogicReader; /** * Logic reader for policy tests. diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelComparerTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelComparerTest.java index cfebf19a5..f9514ae5b 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelComparerTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelComparerTest.java @@ -27,7 +27,6 @@ import static org.junit.Assert.assertTrue; import java.io.IOException; import java.util.UUID; - import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo; diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitterTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitterTest.java index c20a40736..5dbdc0fab 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitterTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitterTest.java @@ -27,12 +27,10 @@ import static org.junit.Assert.fail; import java.util.Set; import java.util.TreeSet; - import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.handling.ApexModelException; import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; -import org.onap.policy.apex.model.policymodel.handling.PolicyModelSplitter; public class PolicyModelSplitterTest { @Test diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/SupportApexPolicyModelCreator.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/SupportApexPolicyModelCreator.java index b2c49b6b4..3fca39739 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/SupportApexPolicyModelCreator.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/SupportApexPolicyModelCreator.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.model.policymodel.handling; 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.AxKeyInformation; diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/utils/SupportPolicyModelValidator.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/utils/SupportPolicyModelValidator.java index 1c0d933e5..daff1efa7 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/utils/SupportPolicyModelValidator.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/utils/SupportPolicyModelValidator.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.policymodel.utils; import java.io.FileInputStream; import java.io.FileNotFoundException; - import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; import org.onap.policy.apex.model.basicmodel.handling.ApexModelException; import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader; diff --git a/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/DirectoryUtils.java b/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/DirectoryUtils.java index 7cd5228cc..b129ce21c 100644 --- a/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/DirectoryUtils.java +++ b/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/DirectoryUtils.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.model.utilities; import java.io.File; - import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; diff --git a/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/json/JsonHandler.java b/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/json/JsonHandler.java index 9ec5f590e..bc0551c57 100644 --- a/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/json/JsonHandler.java +++ b/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/json/JsonHandler.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.utilities.json; import com.google.gson.Gson; import com.google.gson.GsonBuilder; - import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; diff --git a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/CollectionUtilitiesTest.java b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/CollectionUtilitiesTest.java index 22c630bbf..2512133e7 100644 --- a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/CollectionUtilitiesTest.java +++ b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/CollectionUtilitiesTest.java @@ -24,9 +24,7 @@ import static org.junit.Assert.assertEquals; import java.util.ArrayList; import java.util.List; - import org.junit.Test; -import org.onap.policy.apex.model.utilities.CollectionUtils; public class CollectionUtilitiesTest { diff --git a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/DirectoryUtilsTest.java b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/DirectoryUtilsTest.java index c1d255c28..0e9c71c27 100644 --- a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/DirectoryUtilsTest.java +++ b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/DirectoryUtilsTest.java @@ -25,7 +25,6 @@ import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.util.Arrays; - import org.junit.Test; import org.onap.policy.common.utils.resources.TextFileUtils; diff --git a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/KeyedMapComparerTest.java b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/KeyedMapComparerTest.java index fb32d9383..fb993b10f 100644 --- a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/KeyedMapComparerTest.java +++ b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/KeyedMapComparerTest.java @@ -26,7 +26,6 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.util.TreeMap; - import org.junit.Test; import org.onap.policy.apex.model.utilities.comparison.KeyedMapComparer; import org.onap.policy.apex.model.utilities.comparison.KeyedMapDifference; diff --git a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/TextFileUtilsTest.java b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/TextFileUtilsTest.java index 62f36946d..1d6f29fe5 100644 --- a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/TextFileUtilsTest.java +++ b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/TextFileUtilsTest.java @@ -26,7 +26,6 @@ import static org.junit.Assert.assertEquals; import java.io.File; import java.io.FileInputStream; import java.io.IOException; - import org.junit.Test; import org.onap.policy.common.utils.resources.TextFileUtils; diff --git a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/TreeMapUtilsTest.java b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/TreeMapUtilsTest.java index 791a4dcf9..7da3f9c47 100644 --- a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/TreeMapUtilsTest.java +++ b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/TreeMapUtilsTest.java @@ -25,9 +25,7 @@ import static org.junit.Assert.assertEquals; import java.util.List; import java.util.Map.Entry; import java.util.TreeMap; - import org.junit.Test; -import org.onap.policy.apex.model.utilities.TreeMapUtils; /** * Test the tree map utilities. diff --git a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/json/JsonHandlerTest.java b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/json/JsonHandlerTest.java index 5242a4a04..ae5d53ec3 100644 --- a/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/json/JsonHandlerTest.java +++ b/model/utilities/src/test/java/org/onap/policy/apex/model/utilities/json/JsonHandlerTest.java @@ -23,12 +23,10 @@ package org.onap.policy.apex.model.utilities.json; import static org.junit.Assert.assertEquals; import com.google.gson.GsonBuilder; - import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; - import org.junit.Test; public class JsonHandlerTest { |