Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix bug in SDNC, read controller info from yaml
[nonrtric.git]
/
policy-agent
/
src
/
main
/
java
/
org
/
oransc
/
policyagent
/
repository
/
PolicyTypes.java
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
9dee6f9
..
7723983
100644
(file)
--- 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,6
+21,7
@@
package org.oransc.policyagent.repository;
import java.util.Collection;
package org.oransc.policyagent.repository;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.HashMap;
import java.util.Map;
@@
-48,19
+49,19
@@
public class PolicyTypes {
types.put(type.name(), type);
}
types.put(type.name(), type);
}
- public boolean contains(String policyType) {
+ public
synchronized
boolean contains(String policyType) {
return types.containsKey(policyType);
}
public synchronized Collection<PolicyType> getAll() {
return types.containsKey(policyType);
}
public synchronized Collection<PolicyType> getAll() {
- return
types.values(
);
+ return
Collections.unmodifiableCollection(types.values()
);
}
}
- public int size() {
+ public
synchronized
int size() {
return types.size();
}
return types.size();
}
- public void clear() {
+ public
synchronized
void clear() {
this.types.clear();
}
}
this.types.clear();
}
}