commit | b6b7f6fc764d4ab7be21cc13e1e844ae1fc75de7 | [log] [tgz] |
---|---|---|
author | ecaiyanlinux <martin.c.yan@est.tech> | Tue Jun 09 00:17:01 2020 +0200 |
committer | ecaiyanlinux <martin.c.yan@est.tech> | Fri Jun 19 19:06:50 2020 +0200 |
tree | 2230faf42ca5eb4ded3d00040f7d79ee99dd0ed5 | |
parent | 53cbab9c2d4b2c3fcf63d9da774844cf7917d087 [diff] |
Fix potential risk of race condition Issue-ID: NONRTRIC-245 Signed-off-by: ecaiyanlinux <martin.c.yan@est.tech> Change-Id: I54f9e8eeaf47e4c06c486e9f988896253471f8bc
diff --git a/policy-agent/src/main/java/org/oransc/policyagent/repository/Services.java b/policy-agent/src/main/java/org/oransc/policyagent/repository/Services.java index 1fd08a8..1c0e15a 100644 --- a/policy-agent/src/main/java/org/oransc/policyagent/repository/Services.java +++ b/policy-agent/src/main/java/org/oransc/policyagent/repository/Services.java
@@ -63,7 +63,7 @@ return registeredServices.size(); } - public void clear() { + public synchronized void clear() { registeredServices.clear(); } }