public class EelfFeature implements PolicyEngineFeatureAPI {
@Override
- public boolean beforeBoot(PolicyEngine engine, String cliArgs[]) {
+ final public boolean beforeBoot(PolicyEngine engine, String cliArgs[]) {
String logback = System.getProperty(Main.LOGBACK_CONFIGURATION_FILE_SYSTEM_PROPERTY,
Main.LOGBACK_CONFIGURATION_FILE_DEFAULT);
// 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);
}
}