diff options
author | Jim Hahn <jrh3@att.com> | 2021-02-17 10:10:39 -0500 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-02-17 10:48:40 -0500 |
commit | 9fb6de04f2402c29a4a792cc118f5bbb53906f81 (patch) | |
tree | 08f09ec4128c1bca05307f26815b0296e1f8bbe3 /models-tosca/src/main/java | |
parent | 9f0fbd02f184071c2de30c944bec311741e6180e (diff) |
Fix sonars from removal of duplicate code
The work to remove duplicate code from models introduced as many new
sonars as it eliminated. :-( Addressed the following new issues:
- visibility of constructor
- use of more specific assertThat() calls
Also added two junit test file that were somehow previously left out.
Issue-ID: POLICY-2905
Change-Id: I7a0206bd157412d3c6d98bfe21797f106b37ac65
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-tosca/src/main/java')
2 files changed, 8 insertions, 8 deletions
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaWithStringProperties.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaWithStringProperties.java index 54bd54073..afe4a84d1 100644 --- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaWithStringProperties.java +++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaWithStringProperties.java @@ -55,7 +55,7 @@ public abstract class JpaToscaWithStringProperties<T extends ToscaWithObjectProp * The Default Constructor creates a {@link JpaToscaWithStringProperties} object with * a null key. */ - public JpaToscaWithStringProperties() { + protected JpaToscaWithStringProperties() { this(new PfConceptKey()); } @@ -65,7 +65,7 @@ public abstract class JpaToscaWithStringProperties<T extends ToscaWithObjectProp * * @param key the key */ - public JpaToscaWithStringProperties(@NonNull final PfConceptKey key) { + protected JpaToscaWithStringProperties(@NonNull final PfConceptKey key) { super(key); } @@ -74,7 +74,7 @@ public abstract class JpaToscaWithStringProperties<T extends ToscaWithObjectProp * * @param copyConcept the concept to copy from */ - public JpaToscaWithStringProperties(@NonNull final JpaToscaWithStringProperties<T> copyConcept) { + protected JpaToscaWithStringProperties(@NonNull final JpaToscaWithStringProperties<T> copyConcept) { super(copyConcept); this.properties = (copyConcept.properties != null ? new LinkedHashMap<>(copyConcept.properties) : null); } @@ -84,7 +84,7 @@ public abstract class JpaToscaWithStringProperties<T extends ToscaWithObjectProp * * @param authorativeConcept the authorative concept to copy from */ - public JpaToscaWithStringProperties(final T authorativeConcept) { + protected JpaToscaWithStringProperties(final T authorativeConcept) { super(new PfConceptKey()); this.fromAuthorative(authorativeConcept); } diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaWithToscaProperties.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaWithToscaProperties.java index 873d900b0..33e4e86b4 100644 --- a/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaWithToscaProperties.java +++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/simple/concepts/JpaToscaWithToscaProperties.java @@ -66,7 +66,7 @@ public abstract class JpaToscaWithToscaProperties<T extends ToscaWithToscaProper * The Default Constructor creates a {@link JpaToscaWithToscaProperties} object with a * null key. */ - public JpaToscaWithToscaProperties() { + protected JpaToscaWithToscaProperties() { this(new PfConceptKey()); } @@ -76,7 +76,7 @@ public abstract class JpaToscaWithToscaProperties<T extends ToscaWithToscaProper * * @param key the key */ - public JpaToscaWithToscaProperties(@NonNull final PfConceptKey key) { + protected JpaToscaWithToscaProperties(@NonNull final PfConceptKey key) { super(key); } @@ -85,7 +85,7 @@ public abstract class JpaToscaWithToscaProperties<T extends ToscaWithToscaProper * * @param copyConcept the concept to copy from */ - public JpaToscaWithToscaProperties(final JpaToscaWithToscaProperties<T> copyConcept) { + protected JpaToscaWithToscaProperties(final JpaToscaWithToscaProperties<T> copyConcept) { super(copyConcept); this.properties = copyConcept.properties == null ? null : new LinkedHashMap<>(copyConcept.properties); } @@ -95,7 +95,7 @@ public abstract class JpaToscaWithToscaProperties<T extends ToscaWithToscaProper * * @param authorativeConcept the authorative concept to copy from */ - public JpaToscaWithToscaProperties(final T authorativeConcept) { + protected JpaToscaWithToscaProperties(final T authorativeConcept) { this.fromAuthorative(authorativeConcept); } |