diff --git a/commons/testing/jarexec/src/main/java/org/apache/stanbol/commons/testing/jarexec/JarExecutor.java b/commons/testing/jarexec/src/main/java/org/apache/stanbol/commons/testing/jarexec/JarExecutor.java index 03c2a884b..0a96d1ce4 100644 --- a/commons/testing/jarexec/src/main/java/org/apache/stanbol/commons/testing/jarexec/JarExecutor.java +++ b/commons/testing/jarexec/src/main/java/org/apache/stanbol/commons/testing/jarexec/JarExecutor.java @@ -72,13 +72,9 @@ public int getServerPort() { return serverPort; } - public static JarExecutor getInstance(Properties config) throws ExecutorException { + public synchronized static JarExecutor getInstance(Properties config) throws ExecutorException { if (instance == null) { - synchronized (JarExecutor.class) { - if (instance == null) { - instance = new JarExecutor(config); - } - } + instance = new JarExecutor(config); } return instance; }