X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fpolicyagent%2Frepository%2FPolicyTypes.java;h=2897a502ab436e2d2a915b2bdc5a3792b256ade3;hb=6a39814272307d0207222c9229b0d765ac062bf0;hp=7723983191a08800fba98f380f1f0ae773d9d4dd;hpb=f694dec2ff16069e6bb5c9de845278f44e8c9591;p=nonrtric.git diff --git a/policy-agent/src/main/java/org/oransc/policyagent/repository/PolicyTypes.java b/policy-agent/src/main/java/org/oransc/policyagent/repository/PolicyTypes.java index 77239831..2897a502 100644 --- a/policy-agent/src/main/java/org/oransc/policyagent/repository/PolicyTypes.java +++ b/policy-agent/src/main/java/org/oransc/policyagent/repository/PolicyTypes.java @@ -21,17 +21,14 @@ package org.oransc.policyagent.repository; import java.util.Collection; -import java.util.Collections; import java.util.HashMap; import java.util.Map; +import java.util.Vector; import org.oransc.policyagent.exceptions.ServiceException; public class PolicyTypes { - private Map types = new HashMap(); - - public PolicyTypes() { - } + private Map types = new HashMap<>(); public synchronized PolicyType getType(String name) throws ServiceException { PolicyType t = types.get(name); @@ -54,7 +51,7 @@ public class PolicyTypes { } public synchronized Collection getAll() { - return Collections.unmodifiableCollection(types.values()); + return new Vector<>(types.values()); } public synchronized int size() {