summaryrefslogtreecommitdiffstats
path: root/models-tosca/src/main
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-08-25 12:30:29 -0400
committerJim Hahn <jrh3@att.com>2020-08-25 14:28:02 -0400
commit59f4f54cdf4c1a5c155360239272da690e8c4a72 (patch)
tree47fc9d91bb83b62f429e1ae8b1587c314f710f41 /models-tosca/src/main
parent43aaa62cdf9a7dadfb6d688f1fe83c5bd355a86d (diff)
Address more sonar issues in policy-models
Addressed sonar issues: - diamond operator Also removed a number of the "NOSONAR" comments now that we know how to address them without disabling sonar. Issue-ID: POLICY-2714 Change-Id: I440f4fa955968fd911616c2b6ee61b4b4d013821 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-tosca/src/main')
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaConstraintLogical.java6
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaConstraintValidValues.java5
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaDataTypes.java4
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicies.java4
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicyTypes.java4
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaServiceTemplates.java3
6 files changed, 14 insertions, 12 deletions
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaConstraintLogical.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaConstraintLogical.java
index cd6216473..73546f681 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaConstraintLogical.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaConstraintLogical.java
@@ -37,12 +37,10 @@ public class JpaToscaConstraintLogical extends JpaToscaConstraint {
private static final long serialVersionUID = -2730203215911880756L;
@Column
- @NonNull
@Getter
private JpaToscaConstraintOperation operation;
@Column
- @NonNull
@Getter
private String compareTo;
@@ -63,8 +61,10 @@ public class JpaToscaConstraintLogical extends JpaToscaConstraint {
*
* @param authorativeConcept the authorative concept to copy from
*/
- @SuppressWarnings("java:S2637")
public JpaToscaConstraintLogical(final ToscaConstraint authorativeConcept) {
+ /*
+ * The following will call invoke fromAuthorative() which will populate the class fields.
+ */
super(authorativeConcept);
}
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaConstraintValidValues.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaConstraintValidValues.java
index 8f10acad9..9941bc9fd 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaConstraintValidValues.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaConstraintValidValues.java
@@ -42,7 +42,6 @@ public class JpaToscaConstraintValidValues extends JpaToscaConstraint {
private static final long serialVersionUID = -5060193250508635456L;
@ElementCollection
- @NonNull
@Getter
private List<String> validValues;
@@ -60,8 +59,10 @@ public class JpaToscaConstraintValidValues extends JpaToscaConstraint {
*
* @param authorativeConcept the authorative concept to copy from
*/
- @SuppressWarnings("java:S2637")
public JpaToscaConstraintValidValues(final ToscaConstraint authorativeConcept) {
+ /*
+ * The following will call invoke fromAuthorative() which will populate the class fields.
+ */
super(authorativeConcept);
}
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaDataTypes.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaDataTypes.java
index afcb87473..e570c05bb 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaDataTypes.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaDataTypes.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019-2020 Nordix Foundation.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -70,7 +70,7 @@ public class JpaToscaDataTypes extends PfConceptContainer<JpaToscaDataType, Tosc
* @param key the concept key
*/
public JpaToscaDataTypes(final PfConceptKey key) {
- super(key, new TreeMap<PfConceptKey, JpaToscaDataType>());
+ super(key, new TreeMap<>());
}
/**
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicies.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicies.java
index f1f8e5d09..ba32ac314 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicies.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicies.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019-2020 Nordix Foundation.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -72,7 +72,7 @@ public class JpaToscaPolicies extends PfConceptContainer<JpaToscaPolicy, ToscaPo
* @param key the concept key
*/
public JpaToscaPolicies(final PfConceptKey key) {
- super(key, new TreeMap<PfConceptKey, JpaToscaPolicy>());
+ super(key, new TreeMap<>());
}
/**
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicyTypes.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicyTypes.java
index ee2c82ba5..0a3d070ca 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicyTypes.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaPolicyTypes.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019-2020 Nordix Foundation.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -70,7 +70,7 @@ public class JpaToscaPolicyTypes extends PfConceptContainer<JpaToscaPolicyType,
* @param key the concept key
*/
public JpaToscaPolicyTypes(final PfConceptKey key) {
- super(key, new TreeMap<PfConceptKey, JpaToscaPolicyType>());
+ super(key, new TreeMap<>());
}
/**
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaServiceTemplates.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaServiceTemplates.java
index 23c81b677..4f9fa43f8 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaServiceTemplates.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaServiceTemplates.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -61,7 +62,7 @@ public class JpaToscaServiceTemplates extends PfConceptContainer<JpaToscaService
* @param key the concept key
*/
public JpaToscaServiceTemplates(final PfConceptKey key) {
- super(key, new TreeMap<PfConceptKey, JpaToscaServiceTemplate>());
+ super(key, new TreeMap<>());
}
/**