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/basic-model/src/main/java/org | |
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/basic-model/src/main/java/org')
20 files changed, 6 insertions, 39 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; /** |