Index: log4j-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- log4j-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java (revision e4bca837b5d99c982e9126e869665e9c83cad1dd) +++ log4j-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java (revision ) @@ -117,14 +117,16 @@ if (INSTANCE == null) { try { STARTUP_LOCK.lockInterruptibly(); + try { - if (INSTANCE == null) { - INSTANCE = new ProviderUtil(); - } + if (INSTANCE == null) { + INSTANCE = new ProviderUtil(); + } + } finally { + STARTUP_LOCK.unlock(); + } } catch (final InterruptedException e) { LOGGER.fatal("Interrupted before Log4j Providers could be loaded.", e); Thread.currentThread().interrupt(); - } finally { - STARTUP_LOCK.unlock(); } } }