summaryrefslogtreecommitdiffstats
path: root/policy-utils
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2017-11-21 17:40:58 +0000
committerGerrit Code Review <gerrit@onap.org>2017-11-21 17:40:58 +0000
commit522edbec8a09d2aa7514980b6e8593015d75814d (patch)
tree90cbfad576fdcc421d86a4a60c6075ecc029c247 /policy-utils
parent655c34d4893baecb4052cc3c6524c8b7301bdfae (diff)
parentd93245a8de9cf3adc381fa065f20d4199a9dcde8 (diff)
Merge "Fix fortify issues identified in drools"
Diffstat (limited to 'policy-utils')
-rw-r--r--policy-utils/src/main/java/org/onap/policy/drools/utils/PropertyUtil.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/policy-utils/src/main/java/org/onap/policy/drools/utils/PropertyUtil.java b/policy-utils/src/main/java/org/onap/policy/drools/utils/PropertyUtil.java
index 84043d8f..d69ea339 100644
--- a/policy-utils/src/main/java/org/onap/policy/drools/utils/PropertyUtil.java
+++ b/policy-utils/src/main/java/org/onap/policy/drools/utils/PropertyUtil.java
@@ -147,17 +147,14 @@ public class PropertyUtil
// add to static table, so this instance can be shared
registrations.put(file, this);
- if (timer == null)
+ // still need to create a timer thread
+ synchronized(PropertyUtil.class)
{
- // still need to create a timer thread
- synchronized(PropertyUtil.class)
+ // an additional check is added inside the 'synchronized' block,
+ // just in case someone beat us to it
+ if (timer == null)
{
- // an additional check is added inside the 'synchronized' block,
- // just in case someone beat us to it
- if (timer == null)
- {
- timer = new Timer("PropertyUtil-Timer", true);
- }
+ timer = new Timer("PropertyUtil-Timer", true);
}
}