summaryrefslogtreecommitdiffstats
path: root/models-base/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'models-base/src/main/java/org')
-rw-r--r--models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java3
-rw-r--r--models-base/src/main/java/org/onap/policy/models/base/PfObjectFilter.java2
2 files changed, 4 insertions, 1 deletions
diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java b/models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java
index e197e13a4..65a28cffe 100644
--- a/models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java
+++ b/models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java
@@ -170,6 +170,9 @@ public class PfConceptContainer<C extends PfConcept, A extends PfNameVersion> ex
if (incomingConceptEntry.getValue().getVersion() != null) {
conceptKey.setVersion(incomingConceptEntry.getValue().getVersion());
}
+ else {
+ conceptKey.setVersion(PfKey.NULL_KEY_VERSION);
+ }
// After all that, save the map entry
conceptMap.put(conceptKey, jpaConcept);
diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfObjectFilter.java b/models-base/src/main/java/org/onap/policy/models/base/PfObjectFilter.java
index a377c24be..0fca00d39 100644
--- a/models-base/src/main/java/org/onap/policy/models/base/PfObjectFilter.java
+++ b/models-base/src/main/java/org/onap/policy/models/base/PfObjectFilter.java
@@ -59,7 +59,7 @@ public interface PfObjectFilter<T extends Comparable<T>> {
* @return the filtered list
*/
public default List<T> latestVersionFilter(final List<T> originalList) {
- List<T> filteredList = new ArrayList<>();
+ List<T> filteredList = new ArrayList<>(originalList);
Collections.sort(filteredList);
List<T> filteredOutList = new ArrayList<>();