Modified: 
websites/production/commons/content/proper/commons-logging/jacoco/org.apache.commons.logging/LogFactory.java.html
==============================================================================
--- 
websites/production/commons/content/proper/commons-logging/jacoco/org.apache.commons.logging/LogFactory.java.html
 (original)
+++ 
websites/production/commons/content/proper/commons-logging/jacoco/org.apache.commons.logging/LogFactory.java.html
 Thu Jul  4 12:10:51 2024
@@ -43,6 +43,7 @@ import java.util.ServiceLoader;
  * <strong>IMPLEMENTATION NOTE</strong> - This implementation is 
heavily
  * based on the SAXParserFactory and DocumentBuilderFactory implementations
  * (corresponding to the JAXP pluggability APIs) found in Apache Xerces.
+ * </p>
  */
 public abstract class LogFactory {
     // Implementation note re AccessController usage
@@ -156,15 +157,19 @@ public abstract class LogFactory {
      * class loaders to be substituted by an alternative implementation.
      * <p>
      * <strong>Note:</strong> {@code LogFactory} will print:
+     * </p>
      * <pre>
      * [ERROR] LogFactory: Load of custom hashtable failed
      * </pre>
+     * <p>
      * to system error and then continue using a standard Hashtable.
+     * </p>
      * <p>
      * <strong>Usage:</strong> Set this property when Java is 
invoked
      * and {@code LogFactory} will attempt to load a new instance
      * of the given implementation class.
      * For example, running the following ant scriplet:
+     * </p>
      * <pre>
      *  <java classname="${test.runner}" fork="yes" 
failonerror="${test.failonerror}">
      *     ...
@@ -173,13 +178,16 @@ public abstract class LogFactory {
      *        
value="org.apache.commons.logging.AltHashtable"/>
      *  </java>
      * </pre>
+     * <p>
      * will mean that {@code LogFactory} will load an instance of
      * {@code org.apache.commons.logging.AltHashtable}.
+     * </p>
      * <p>
      * A typical use case is to allow a custom
      * Hashtable implementation using weak references to be substituted.
      * This will allow class loaders to be garbage collected without
      * the need to release them (on 1.3+ JVMs only, of course ;).
+     * </p>
      */
     public static final String HASHTABLE_IMPLEMENTATION_PROPERTY =
         "org.apache.commons.logging.LogFactory.HashtableImpl";
@@ -230,8 +238,8 @@ public abstract class LogFactory {
     static {
         // note: it's safe to call methods before initDiagnostics (though
         // diagnostic output gets discarded).
-<span class="fc" id="L233">        final ClassLoader thisClassLoader = 
getClassLoader(LogFactory.class);</span>
-<span class="fc" id="L234">        thisClassLoaderRef = new 
WeakReference&lt;&gt;(thisClassLoader);</span>
+<span class="fc" id="L241">        final ClassLoader thisClassLoader = 
getClassLoader(LogFactory.class);</span>
+<span class="fc" id="L242">        thisClassLoaderRef = new 
WeakReference&lt;&gt;(thisClassLoader);</span>
         // In order to avoid confusion where multiple instances of JCL are
         // being used via different class loaders within the same app, we
         // ensure each logged message has a prefix of form
@@ -243,22 +251,22 @@ public abstract class LogFactory {
         // output diagnostics from this class are static.
         String classLoaderName;
         try {
-<span class="pc bpc" id="L246" title="1 of 2 branches missed.">            if 
(thisClassLoader == null) {</span>
-<span class="nc" id="L247">                classLoaderName = 
&quot;BOOTLOADER&quot;;</span>
+<span class="pc bpc" id="L254" title="1 of 2 branches missed.">            if 
(thisClassLoader == null) {</span>
+<span class="nc" id="L255">                classLoaderName = 
&quot;BOOTLOADER&quot;;</span>
             } else {
-<span class="fc" id="L249">                classLoaderName = 
objectId(thisClassLoader);</span>
+<span class="fc" id="L257">                classLoaderName = 
objectId(thisClassLoader);</span>
             }
-<span class="nc" id="L251">        } catch (final SecurityException e) {</span>
-<span class="nc" id="L252">            classLoaderName = 
&quot;UNKNOWN&quot;;</span>
-<span class="fc" id="L253">        }</span>
-<span class="fc" id="L254">        diagnosticPrefix = &quot;[LogFactory from 
&quot; + classLoaderName + &quot;] &quot;;</span>
-<span class="fc" id="L255">        DIAGNOSTICS_STREAM = 
initDiagnostics();</span>
-<span class="fc" id="L256">        
logClassLoaderEnvironment(LogFactory.class);</span>
-<span class="fc" id="L257">        factories = createFactoryStore();</span>
-<span class="pc bpc" id="L258" title="1 of 2 branches missed.">        if 
(isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L259">            logDiagnostic(&quot;BOOTSTRAP 
COMPLETED&quot;);</span>
+<span class="nc" id="L259">        } catch (final SecurityException e) {</span>
+<span class="nc" id="L260">            classLoaderName = 
&quot;UNKNOWN&quot;;</span>
+<span class="fc" id="L261">        }</span>
+<span class="fc" id="L262">        diagnosticPrefix = &quot;[LogFactory from 
&quot; + classLoaderName + &quot;] &quot;;</span>
+<span class="fc" id="L263">        DIAGNOSTICS_STREAM = 
initDiagnostics();</span>
+<span class="fc" id="L264">        
logClassLoaderEnvironment(LogFactory.class);</span>
+<span class="fc" id="L265">        factories = createFactoryStore();</span>
+<span class="pc bpc" id="L266" title="1 of 2 branches missed.">        if 
(isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L267">            logDiagnostic(&quot;BOOTSTRAP 
COMPLETED&quot;);</span>
         }
-<span class="fc" id="L261">    }</span>
+<span class="fc" id="L269">    }</span>
 
     /**
      * Remember this factory, so later calls to LogFactory.getCachedFactory
@@ -273,14 +281,14 @@ public abstract class LogFactory {
         // Ideally we would assert(factory != null) here. However reporting
         // errors from within a logging implementation is a little tricky!
 
-<span class="pc bpc" id="L276" title="1 of 2 branches missed.">        if 
(factory != null) {</span>
-<span class="fc bfc" id="L277" title="All 2 branches covered.">            if 
(classLoader == null) {</span>
-<span class="fc" id="L278">                nullClassLoaderFactory = 
factory;</span>
+<span class="pc bpc" id="L284" title="1 of 2 branches missed.">        if 
(factory != null) {</span>
+<span class="fc bfc" id="L285" title="All 2 branches covered.">            if 
(classLoader == null) {</span>
+<span class="fc" id="L286">                nullClassLoaderFactory = 
factory;</span>
             } else {
-<span class="fc" id="L280">                factories.put(classLoader, 
factory);</span>
+<span class="fc" id="L288">                factories.put(classLoader, 
factory);</span>
             }
         }
-<span class="fc" id="L283">    }</span>
+<span class="fc" id="L291">    }</span>
 
     /**
      * Implements the operations described in the Javadoc for newFactory.
@@ -294,18 +302,18 @@ public abstract class LogFactory {
     protected static Object createFactory(final String factoryClassName, final 
ClassLoader classLoader) {
         // This will be used to diagnose bad configurations
         // and allow a useful message to be sent to the user
-<span class="fc" id="L297">        Class&lt;?&gt; logFactoryClass = 
null;</span>
+<span class="fc" id="L305">        Class&lt;?&gt; logFactoryClass = 
null;</span>
         try {
-<span class="pc bpc" id="L299" title="1 of 2 branches missed.">            if 
(classLoader != null) {</span>
+<span class="pc bpc" id="L307" title="1 of 2 branches missed.">            if 
(classLoader != null) {</span>
                 try {
                     // First the given class loader param (thread class loader)
 
                     // Warning: must typecast here &amp; allow exception
                     // to be generated/caught &amp; recast properly.
-<span class="fc" id="L305">                    logFactoryClass = 
classLoader.loadClass(factoryClassName);</span>
-<span class="pc bpc" id="L306" title="1 of 2 branches missed.">                
    if (LogFactory.class.isAssignableFrom(logFactoryClass)) {</span>
-<span class="pc bpc" id="L307" title="1 of 2 branches missed.">                
        if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L308">                            
logDiagnostic(&quot;Loaded class &quot; + logFactoryClass.getName() + &quot; 
from class loader &quot; + objectId(classLoader));</span>
+<span class="fc" id="L313">                    logFactoryClass = 
classLoader.loadClass(factoryClassName);</span>
+<span class="pc bpc" id="L314" title="1 of 2 branches missed.">                
    if (LogFactory.class.isAssignableFrom(logFactoryClass)) {</span>
+<span class="pc bpc" id="L315" title="1 of 2 branches missed.">                
        if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L316">                            
logDiagnostic(&quot;Loaded class &quot; + logFactoryClass.getName() + &quot; 
from class loader &quot; + objectId(classLoader));</span>
                         }
                     } else //
                     // This indicates a problem with the ClassLoader tree.
@@ -318,72 +326,72 @@ public abstract class LogFactory {
                     // problem is to remove the extra JCL jars from the
                     // ClassLoader hierarchy.
                     //
-<span class="nc bnc" id="L321" title="All 2 branches missed.">                 
   if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L322">                        logDiagnostic(&quot;Factory 
class &quot; + logFactoryClass.getName() + &quot; loaded from class loader 
&quot; + objectId(logFactoryClass.getClassLoader())</span>
-<span class="nc" id="L323">                                + &quot; does not 
extend '&quot; + LogFactory.class.getName() + &quot;' as loaded by this class 
loader.&quot;);</span>
-<span class="nc" id="L324">                        logHierarchy(&quot;[BAD CL 
TREE] &quot;, classLoader);</span>
+<span class="nc bnc" id="L329" title="All 2 branches missed.">                 
   if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L330">                        logDiagnostic(&quot;Factory 
class &quot; + logFactoryClass.getName() + &quot; loaded from class loader 
&quot; + objectId(logFactoryClass.getClassLoader())</span>
+<span class="nc" id="L331">                                + &quot; does not 
extend '&quot; + LogFactory.class.getName() + &quot;' as loaded by this class 
loader.&quot;);</span>
+<span class="nc" id="L332">                        logHierarchy(&quot;[BAD CL 
TREE] &quot;, classLoader);</span>
                     }
 
-<span class="fc" id="L327">                    return 
logFactoryClass.getConstructor().newInstance();</span>
+<span class="fc" id="L335">                    return 
logFactoryClass.getConstructor().newInstance();</span>
 
-<span class="fc" id="L329">                } catch (final 
ClassNotFoundException ex) {</span>
-<span class="pc bpc" id="L330" title="1 of 2 branches missed.">                
    if (classLoader == thisClassLoaderRef.get()) {</span>
+<span class="fc" id="L337">                } catch (final 
ClassNotFoundException ex) {</span>
+<span class="pc bpc" id="L338" title="1 of 2 branches missed.">                
    if (classLoader == thisClassLoaderRef.get()) {</span>
                         // Nothing more to try, onwards.
-<span class="pc bpc" id="L332" title="1 of 2 branches missed.">                
        if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L333">                            
logDiagnostic(&quot;Unable to locate any class called '&quot; + 
factoryClassName + &quot;' via class loader &quot; + 
objectId(classLoader));</span>
+<span class="pc bpc" id="L340" title="1 of 2 branches missed.">                
        if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L341">                            
logDiagnostic(&quot;Unable to locate any class called '&quot; + 
factoryClassName + &quot;' via class loader &quot; + 
objectId(classLoader));</span>
                         }
-<span class="fc" id="L335">                        throw ex;</span>
+<span class="fc" id="L343">                        throw ex;</span>
                     }
                     // ignore exception, continue
-<span class="nc" id="L338">                } catch (final NoClassDefFoundError 
e) {</span>
-<span class="nc bnc" id="L339" title="All 2 branches missed.">                 
   if (classLoader == thisClassLoaderRef.get()) {</span>
+<span class="nc" id="L346">                } catch (final NoClassDefFoundError 
e) {</span>
+<span class="nc bnc" id="L347" title="All 2 branches missed.">                 
   if (classLoader == thisClassLoaderRef.get()) {</span>
                         // Nothing more to try, onwards.
-<span class="nc bnc" id="L341" title="All 2 branches missed.">                 
       if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L342">                            
logDiagnostic(&quot;Class '&quot; + factoryClassName + &quot;' cannot be 
loaded&quot; + &quot; via class loader &quot; + objectId(classLoader)</span>
+<span class="nc bnc" id="L349" title="All 2 branches missed.">                 
       if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L350">                            
logDiagnostic(&quot;Class '&quot; + factoryClassName + &quot;' cannot be 
loaded&quot; + &quot; via class loader &quot; + objectId(classLoader)</span>
                                     + &quot; - it depends on some other class 
that cannot be found.&quot;);
                         }
-<span class="nc" id="L345">                        throw e;</span>
+<span class="nc" id="L353">                        throw e;</span>
                     }
                     // ignore exception, continue
-<span class="nc" id="L348">                } catch (final ClassCastException 
e) {</span>
-<span class="nc bnc" id="L349" title="All 2 branches missed.">                 
   if (classLoader == thisClassLoaderRef.get()) {</span>
+<span class="nc" id="L356">                } catch (final ClassCastException 
e) {</span>
+<span class="nc bnc" id="L357" title="All 2 branches missed.">                 
   if (classLoader == thisClassLoaderRef.get()) {</span>
                         // There's no point in falling through to the code 
below that
                         // tries again with thisClassLoaderRef, because we've 
just tried
                         // loading with that loader (not the TCCL). Just throw 
an
                         // appropriate exception here.
 
-<span class="nc" id="L355">                        final boolean 
implementsLogFactory = implementsLogFactory(logFactoryClass);</span>
+<span class="nc" id="L363">                        final boolean 
implementsLogFactory = implementsLogFactory(logFactoryClass);</span>
 
                         //
                         // Construct a good message: users may not actual 
expect that a custom implementation
                         // has been specified. Several well known containers 
use this mechanism to adapt JCL
                         // to their native logging system.
                         //
-<span class="nc" id="L362">                        final StringBuilder msg = 
new StringBuilder();</span>
-<span class="nc" id="L363">                        msg.append(&quot;The 
application has specified that a custom LogFactory implementation 
&quot;);</span>
-<span class="nc" id="L364">                        msg.append(&quot;should be 
used but Class '&quot;);</span>
-<span class="nc" id="L365">                        
msg.append(factoryClassName);</span>
-<span class="nc" id="L366">                        msg.append(&quot;' cannot 
be converted to '&quot;);</span>
-<span class="nc" id="L367">                        
msg.append(LogFactory.class.getName());</span>
-<span class="nc" id="L368">                        msg.append(&quot;'. 
&quot;);</span>
-<span class="nc bnc" id="L369" title="All 2 branches missed.">                 
       if (implementsLogFactory) {</span>
-<span class="nc" id="L370">                            msg.append(&quot;The 
conflict is caused by the presence of multiple LogFactory classes 
&quot;);</span>
-<span class="nc" id="L371">                            msg.append(&quot;in 
incompatible class loaders. &quot;);</span>
-<span class="nc" id="L372">                            
msg.append(&quot;Background can be found in 
https://commons.apache.org/logging/tech.html. &quot;);</span>
-<span class="nc" id="L373">                            msg.append(&quot;If you 
have not explicitly specified a custom LogFactory then it is likely 
&quot;);</span>
-<span class="nc" id="L374">                            msg.append(&quot;that 
the container has set one without your knowledge. &quot;);</span>
-<span class="nc" id="L375">                            msg.append(&quot;In 
this case, consider using the commons-logging-adapters.jar file or 
&quot;);</span>
-<span class="nc" id="L376">                            
msg.append(&quot;specifying the standard LogFactory from the command line. 
&quot;);</span>
+<span class="nc" id="L370">                        final StringBuilder msg = 
new StringBuilder();</span>
+<span class="nc" id="L371">                        msg.append(&quot;The 
application has specified that a custom LogFactory implementation 
&quot;);</span>
+<span class="nc" id="L372">                        msg.append(&quot;should be 
used but Class '&quot;);</span>
+<span class="nc" id="L373">                        
msg.append(factoryClassName);</span>
+<span class="nc" id="L374">                        msg.append(&quot;' cannot 
be converted to '&quot;);</span>
+<span class="nc" id="L375">                        
msg.append(LogFactory.class.getName());</span>
+<span class="nc" id="L376">                        msg.append(&quot;'. 
&quot;);</span>
+<span class="nc bnc" id="L377" title="All 2 branches missed.">                 
       if (implementsLogFactory) {</span>
+<span class="nc" id="L378">                            msg.append(&quot;The 
conflict is caused by the presence of multiple LogFactory classes 
&quot;);</span>
+<span class="nc" id="L379">                            msg.append(&quot;in 
incompatible class loaders. &quot;);</span>
+<span class="nc" id="L380">                            
msg.append(&quot;Background can be found in 
https://commons.apache.org/logging/tech.html. &quot;);</span>
+<span class="nc" id="L381">                            msg.append(&quot;If you 
have not explicitly specified a custom LogFactory then it is likely 
&quot;);</span>
+<span class="nc" id="L382">                            msg.append(&quot;that 
the container has set one without your knowledge. &quot;);</span>
+<span class="nc" id="L383">                            msg.append(&quot;In 
this case, consider using the commons-logging-adapters.jar file or 
&quot;);</span>
+<span class="nc" id="L384">                            
msg.append(&quot;specifying the standard LogFactory from the command line. 
&quot;);</span>
                         } else {
-<span class="nc" id="L378">                            msg.append(&quot;Please 
check the custom implementation. &quot;);</span>
+<span class="nc" id="L386">                            msg.append(&quot;Please 
check the custom implementation. &quot;);</span>
                         }
-<span class="nc" id="L380">                        msg.append(&quot;Help can 
be found at 
https://commons.apache.org/logging/troubleshooting.html.&quot;);</span>
+<span class="nc" id="L388">                        msg.append(&quot;Help can 
be found at 
https://commons.apache.org/logging/troubleshooting.html.&quot;);</span>
 
-<span class="nc bnc" id="L382" title="All 2 branches missed.">                 
       if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L383">                            
logDiagnostic(msg.toString());</span>
+<span class="nc bnc" id="L390" title="All 2 branches missed.">                 
       if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L391">                            
logDiagnostic(msg.toString());</span>
                         }
 
-<span class="nc" id="L386">                        throw new 
ClassCastException(msg.toString());</span>
+<span class="nc" id="L394">                        throw new 
ClassCastException(msg.toString());</span>
                     }
 
                     // Ignore exception, continue. Presumably the class loader 
was the
@@ -398,7 +406,7 @@ public abstract class LogFactory {
                     // in a shared classpath. In that case:
                     // (a) the class really does implement LogFactory (bad log 
msg above)
                     // (b) the fallback code will result in exactly the same 
problem.
-<span class="nc" id="L401">                }</span>
+<span class="nc" id="L409">                }</span>
             }
 
             /*
@@ -412,22 +420,22 @@ public abstract class LogFactory {
              */
             // Warning: must typecast here &amp; allow exception
             // to be generated/caught &amp; recast properly.
-<span class="nc bnc" id="L415" title="All 2 branches missed.">            if 
(isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L416">                logDiagnostic(</span>
-<span class="nc" id="L417">                        &quot;Unable to load 
factory class via class loader &quot; + objectId(classLoader) + &quot; - trying 
the class loader associated with this LogFactory.&quot;);</span>
-            }
-<span class="nc" id="L419">            logFactoryClass = 
Class.forName(factoryClassName);</span>
-<span class="nc" id="L420">            return 
logFactoryClass.newInstance();</span>
-<span class="fc" id="L421">        } catch (final Exception e) {</span>
+<span class="nc bnc" id="L423" title="All 2 branches missed.">            if 
(isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L424">                logDiagnostic(</span>
+<span class="nc" id="L425">                        &quot;Unable to load 
factory class via class loader &quot; + objectId(classLoader) + &quot; - trying 
the class loader associated with this LogFactory.&quot;);</span>
+            }
+<span class="nc" id="L427">            logFactoryClass = 
Class.forName(factoryClassName);</span>
+<span class="nc" id="L428">            return 
logFactoryClass.newInstance();</span>
+<span class="fc" id="L429">        } catch (final Exception e) {</span>
             // Check to see if we've got a bad configuration
-<span class="pc bpc" id="L423" title="1 of 2 branches missed.">            if 
(isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L424">                logDiagnostic(&quot;Unable to 
create LogFactory instance.&quot;);</span>
+<span class="pc bpc" id="L431" title="1 of 2 branches missed.">            if 
(isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L432">                logDiagnostic(&quot;Unable to 
create LogFactory instance.&quot;);</span>
             }
-<span class="pc bpc" id="L426" title="3 of 4 branches missed.">            if 
(logFactoryClass != null &amp;&amp; 
!LogFactory.class.isAssignableFrom(logFactoryClass)) {</span>
-<span class="nc" id="L427">                return new 
LogConfigurationException(&quot;The chosen LogFactory implementation does not 
extend LogFactory.&quot; + &quot; Please check your configuration.&quot;,</span>
+<span class="pc bpc" id="L434" title="3 of 4 branches missed.">            if 
(logFactoryClass != null &amp;&amp; 
!LogFactory.class.isAssignableFrom(logFactoryClass)) {</span>
+<span class="nc" id="L435">                return new 
LogConfigurationException(&quot;The chosen LogFactory implementation does not 
extend LogFactory.&quot; + &quot; Please check your configuration.&quot;,</span>
                         e);
             }
-<span class="fc" id="L430">            return new 
LogConfigurationException(e);</span>
+<span class="fc" id="L438">            return new 
LogConfigurationException(e);</span>
         }
     }
 
@@ -445,45 +453,46 @@ public abstract class LogFactory {
      * Note that the correct way to ensure no memory leaks occur is to ensure
      * that LogFactory.release(contextClassLoader) is called whenever a
      * webapp is undeployed.
+     * &lt;/p&gt;
      */
     private static Hashtable&lt;ClassLoader, LogFactory&gt; 
createFactoryStore() {
-<span class="fc" id="L450">        Hashtable&lt;ClassLoader, LogFactory&gt; 
result = null;</span>
+<span class="fc" id="L459">        Hashtable&lt;ClassLoader, LogFactory&gt; 
result = null;</span>
         String storeImplementationClass;
         try {
-<span class="fc" id="L453">            storeImplementationClass = 
getSystemProperty(HASHTABLE_IMPLEMENTATION_PROPERTY, null);</span>
-<span class="nc" id="L454">        } catch (final SecurityException ex) 
{</span>
+<span class="fc" id="L462">            storeImplementationClass = 
getSystemProperty(HASHTABLE_IMPLEMENTATION_PROPERTY, null);</span>
+<span class="fc" id="L463">        } catch (final SecurityException ex) 
{</span>
             // Permissions don't allow this to be accessed. Default to the 
&quot;modern&quot;
             // weak hashtable implementation if it is available.
-<span class="nc" id="L457">            storeImplementationClass = null;</span>
-<span class="fc" id="L458">        }</span>
+<span class="fc" id="L466">            storeImplementationClass = null;</span>
+<span class="fc" id="L467">        }</span>
 
-<span class="fc bfc" id="L460" title="All 2 branches covered.">        if 
(storeImplementationClass == null) {</span>
-<span class="fc" id="L461">            storeImplementationClass = 
WEAK_HASHTABLE_CLASSNAME;</span>
+<span class="fc bfc" id="L469" title="All 2 branches covered.">        if 
(storeImplementationClass == null) {</span>
+<span class="fc" id="L470">            storeImplementationClass = 
WEAK_HASHTABLE_CLASSNAME;</span>
         }
         try {
-<span class="fc" id="L464">            final 
Class&lt;Hashtable&lt;ClassLoader, LogFactory&gt;&gt; implementationClass = 
(Class&lt;Hashtable&lt;ClassLoader, LogFactory&gt;&gt;) Class</span>
-<span class="fc" id="L465">                    
.forName(storeImplementationClass);</span>
-<span class="fc" id="L466">            result = 
implementationClass.getConstructor().newInstance();</span>
-<span class="nc" id="L467">        } catch (final Throwable t) {</span>
-<span class="nc" id="L468">            handleThrowable(t); // may re-throw 
t</span>
+<span class="fc" id="L473">            final 
Class&lt;Hashtable&lt;ClassLoader, LogFactory&gt;&gt; implementationClass = 
(Class&lt;Hashtable&lt;ClassLoader, LogFactory&gt;&gt;) Class</span>
+<span class="fc" id="L474">                    
.forName(storeImplementationClass);</span>
+<span class="fc" id="L475">            result = 
implementationClass.getConstructor().newInstance();</span>
+<span class="nc" id="L476">        } catch (final Throwable t) {</span>
+<span class="nc" id="L477">            handleThrowable(t); // may re-throw 
t</span>
 
             // ignore
-<span class="nc bnc" id="L471" title="All 2 branches missed.">            if 
(!WEAK_HASHTABLE_CLASSNAME.equals(storeImplementationClass)) {</span>
+<span class="nc bnc" id="L480" title="All 2 branches missed.">            if 
(!WEAK_HASHTABLE_CLASSNAME.equals(storeImplementationClass)) {</span>
                 // if the user's trying to set up a custom implementation, 
give a clue
-<span class="nc bnc" id="L473" title="All 2 branches missed.">                
if (isDiagnosticsEnabled()) {</span>
+<span class="nc bnc" id="L482" title="All 2 branches missed.">                
if (isDiagnosticsEnabled()) {</span>
                     // use internal logging to issue the warning
-<span class="nc" id="L475">                    logDiagnostic(&quot;[ERROR] 
LogFactory: Load of custom Hashtable failed&quot;);</span>
+<span class="nc" id="L484">                    logDiagnostic(&quot;[ERROR] 
LogFactory: Load of custom Hashtable failed&quot;);</span>
                 } else {
                     // we *really* want this output, even if diagnostics 
weren't
                     // explicitly enabled by the user.
-<span class="nc" id="L479">                    
System.err.println(&quot;[ERROR] LogFactory: Load of custom Hashtable 
failed&quot;);</span>
+<span class="nc" id="L488">                    
System.err.println(&quot;[ERROR] LogFactory: Load of custom Hashtable 
failed&quot;);</span>
                 }
             }
-<span class="fc" id="L482">        }</span>
-<span class="pc bpc" id="L483" title="1 of 2 branches missed.">        if 
(result == null) {</span>
-<span class="nc" id="L484">            result = new Hashtable&lt;&gt;();</span>
+<span class="fc" id="L491">        }</span>
+<span class="pc bpc" id="L492" title="1 of 2 branches missed.">        if 
(result == null) {</span>
+<span class="nc" id="L493">            result = new Hashtable&lt;&gt;();</span>
         }
-<span class="fc" id="L486">        return result;</span>
+<span class="fc" id="L495">        return result;</span>
     }
 
     /**
@@ -491,13 +500,16 @@ public abstract class LogFactory {
      * &lt;p&gt;
      * Most/all code should call getContextClassLoaderInternal rather than
      * calling this method directly.
+     * &lt;/p&gt;
      * &lt;p&gt;
      * The thread context class loader is available for JDK 1.2
      * or later, if certain security conditions are met.
+     * &lt;/p&gt;
      * &lt;p&gt;
      * Note that no internal logging is done within this method because
      * this method is called every time LogFactory.getLogger() is called,
      * and we don't want too much output generated here.
+     * &lt;/p&gt;
      *
      * @throws LogConfigurationException if a suitable class loader
      *  cannot be identified.
@@ -507,12 +519,10 @@ public abstract class LogFactory {
      * @since 1.1
      */
     protected static ClassLoader directGetContextClassLoader() throws 
LogConfigurationException {
-<span class="fc" id="L510">        ClassLoader classLoader = null;</span>
-
+<span class="fc" id="L522">        ClassLoader classLoader = null;</span>
         try {
-<span class="fc" id="L513">            classLoader = 
Thread.currentThread().getContextClassLoader();</span>
-<span class="nc" id="L514">        } catch (final SecurityException ignore) 
{</span>
-            //
+<span class="fc" id="L524">            classLoader = 
Thread.currentThread().getContextClassLoader();</span>
+<span class="fc" id="L525">        } catch (final SecurityException ignore) 
{</span>
             // getContextClassLoader() throws SecurityException when
             // the context class loader isn't an ancestor of the
             // calling class's class loader, or if security
@@ -520,12 +530,9 @@ public abstract class LogFactory {
             //
             // We ignore this exception to be consistent with the previous
             // behavior (e.g. 1.1.3 and earlier).
-            //
-            // ignore
-<span class="fc" id="L525">        }</span>
-
+<span class="fc" id="L533">        }</span>
         // Return the selected class loader
-<span class="fc" id="L528">        return classLoader;</span>
+<span class="fc" id="L535">        return classLoader;</span>
     }
 
     /**
@@ -543,14 +550,14 @@ public abstract class LogFactory {
      *  we have seen this particular class loader.
      */
     private static LogFactory getCachedFactory(final ClassLoader 
contextClassLoader) {
-<span class="fc bfc" id="L546" title="All 2 branches covered.">        if 
(contextClassLoader == null) {</span>
+<span class="fc bfc" id="L553" title="All 2 branches covered.">        if 
(contextClassLoader == null) {</span>
             // We have to handle this specially, as factories is a Hashtable
             // and those don't accept null as a key value.
             //
             // nb: nullClassLoaderFactory might be null. That's ok.
-<span class="fc" id="L551">            return nullClassLoaderFactory;</span>
+<span class="fc" id="L558">            return nullClassLoaderFactory;</span>
         }
-<span class="fc" id="L553">        return 
factories.get(contextClassLoader);</span>
+<span class="fc" id="L560">        return 
factories.get(contextClassLoader);</span>
     }
 
     /**
@@ -588,12 +595,12 @@ public abstract class LogFactory {
      */
     protected static ClassLoader getClassLoader(final Class&lt;?&gt; clazz) {
         try {
-<span class="fc" id="L591">            return clazz.getClassLoader();</span>
-<span class="nc" id="L592">        } catch (final SecurityException ex) 
{</span>
-<span class="nc bnc" id="L593" title="All 2 branches missed.">            if 
(isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L594">                logDiagnostic(&quot;Unable to get 
class loader for class '&quot; + clazz + &quot;' due to security restrictions - 
&quot; + ex.getMessage());</span>
+<span class="fc" id="L598">            return clazz.getClassLoader();</span>
+<span class="nc" id="L599">        } catch (final SecurityException ex) 
{</span>
+<span class="nc bnc" id="L600" title="All 2 branches missed.">            if 
(isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L601">                logDiagnostic(&quot;Unable to get 
class loader for class '&quot; + clazz + &quot;' due to security restrictions - 
&quot; + ex.getMessage());</span>
             }
-<span class="nc" id="L596">            throw ex;</span>
+<span class="nc" id="L603">            throw ex;</span>
         }
     }
 
@@ -605,9 +612,11 @@ public abstract class LogFactory {
      * null is returned. If more than one is found, then the file with the 
greatest
      * value for its PRIORITY property is returned. If multiple files have the
      * same PRIORITY value then the first in the classpath is returned.
+     * &lt;/p&gt;
      * &lt;p&gt;
      * This differs from the 1.0.x releases; those always use the first one 
found.
      * However as the priority is a new field, this change is backwards 
compatible.
+     * &lt;/p&gt;
      * &lt;p&gt;
      * The purpose of the priority field is to allow a webserver administrator 
to
      * override logging settings in all webapps by placing a 
commons-logging.properties
@@ -615,74 +624,75 @@ public abstract class LogFactory {
      * commons-logging.properties files without priorities which are in the
      * webapps. Webapps can also use explicit priorities to override a 
configuration
      * file in the shared classpath if needed.
+     * &lt;/p&gt;
      */
     private static Properties getConfigurationFile(final ClassLoader 
classLoader, final String fileName) {
-<span class="fc" id="L620">        Properties props = null;</span>
-<span class="fc" id="L621">        double priority = 0.0;</span>
-<span class="fc" id="L622">        URL propsUrl = null;</span>
+<span class="fc" id="L630">        Properties props = null;</span>
+<span class="fc" id="L631">        double priority = 0.0;</span>
+<span class="fc" id="L632">        URL propsUrl = null;</span>
         try {
-<span class="fc" id="L624">            final Enumeration&lt;URL&gt; urls = 
getResources(classLoader, fileName);</span>
+<span class="fc" id="L634">            final Enumeration&lt;URL&gt; urls = 
getResources(classLoader, fileName);</span>
 
-<span class="pc bpc" id="L626" title="1 of 2 branches missed.">            if 
(urls == null) {</span>
-<span class="nc" id="L627">                return null;</span>
+<span class="pc bpc" id="L636" title="1 of 2 branches missed.">            if 
(urls == null) {</span>
+<span class="nc" id="L637">                return null;</span>
             }
 
-<span class="fc bfc" id="L630" title="All 2 branches covered.">            
while (urls.hasMoreElements()) {</span>
-<span class="fc" id="L631">                final URL url = 
urls.nextElement();</span>
+<span class="fc bfc" id="L640" title="All 2 branches covered.">            
while (urls.hasMoreElements()) {</span>
+<span class="fc" id="L641">                final URL url = 
urls.nextElement();</span>
 
-<span class="fc" id="L633">                final Properties newProps = 
getProperties(url);</span>
-<span class="pc bpc" id="L634" title="1 of 2 branches missed.">                
if (newProps != null) {</span>
-<span class="fc bfc" id="L635" title="All 2 branches covered.">                
    if (props == null) {</span>
-<span class="fc" id="L636">                        propsUrl = url;</span>
-<span class="fc" id="L637">                        props = newProps;</span>
-<span class="fc" id="L638">                        final String priorityStr = 
props.getProperty(PRIORITY_KEY);</span>
-<span class="fc" id="L639">                        priority = 0.0;</span>
-<span class="fc bfc" id="L640" title="All 2 branches covered.">                
        if (priorityStr != null) {</span>
-<span class="fc" id="L641">                            priority = 
Double.parseDouble(priorityStr);</span>
+<span class="fc" id="L643">                final Properties newProps = 
getProperties(url);</span>
+<span class="pc bpc" id="L644" title="1 of 2 branches missed.">                
if (newProps != null) {</span>
+<span class="fc bfc" id="L645" title="All 2 branches covered.">                
    if (props == null) {</span>
+<span class="fc" id="L646">                        propsUrl = url;</span>
+<span class="fc" id="L647">                        props = newProps;</span>
+<span class="fc" id="L648">                        final String priorityStr = 
props.getProperty(PRIORITY_KEY);</span>
+<span class="fc" id="L649">                        priority = 0.0;</span>
+<span class="fc bfc" id="L650" title="All 2 branches covered.">                
        if (priorityStr != null) {</span>
+<span class="fc" id="L651">                            priority = 
Double.parseDouble(priorityStr);</span>
                         }
 
-<span class="pc bpc" id="L644" title="1 of 2 branches missed.">                
        if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L645">                            
logDiagnostic(&quot;[LOOKUP] Properties file found at '&quot; + url + 
&quot;'&quot; + &quot; with priority &quot; + priority);</span>
+<span class="pc bpc" id="L654" title="1 of 2 branches missed.">                
        if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L655">                            
logDiagnostic(&quot;[LOOKUP] Properties file found at '&quot; + url + 
&quot;'&quot; + &quot; with priority &quot; + priority);</span>
                         }
-<span class="fc" id="L647">                    } else {</span>
-<span class="fc" id="L648">                        final String newPriorityStr 
= newProps.getProperty(PRIORITY_KEY);</span>
-<span class="fc" id="L649">                        double newPriority = 
0.0;</span>
-<span class="fc bfc" id="L650" title="All 2 branches covered.">                
        if (newPriorityStr != null) {</span>
-<span class="fc" id="L651">                            newPriority = 
Double.parseDouble(newPriorityStr);</span>
+<span class="fc" id="L657">                    } else {</span>
+<span class="fc" id="L658">                        final String newPriorityStr 
= newProps.getProperty(PRIORITY_KEY);</span>
+<span class="fc" id="L659">                        double newPriority = 
0.0;</span>
+<span class="fc bfc" id="L660" title="All 2 branches covered.">                
        if (newPriorityStr != null) {</span>
+<span class="fc" id="L661">                            newPriority = 
Double.parseDouble(newPriorityStr);</span>
                         }
 
-<span class="fc bfc" id="L654" title="All 2 branches covered.">                
        if (newPriority &gt; priority) {</span>
-<span class="pc bpc" id="L655" title="1 of 2 branches missed.">                
            if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L656">                                
logDiagnostic(&quot;[LOOKUP] Properties file at '&quot; + url + &quot;'&quot; + 
&quot; with priority &quot; + newPriority + &quot; overrides file at '&quot; + 
propsUrl</span>
+<span class="fc bfc" id="L664" title="All 2 branches covered.">                
        if (newPriority &gt; priority) {</span>
+<span class="pc bpc" id="L665" title="1 of 2 branches missed.">                
            if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L666">                                
logDiagnostic(&quot;[LOOKUP] Properties file at '&quot; + url + &quot;'&quot; + 
&quot; with priority &quot; + newPriority + &quot; overrides file at '&quot; + 
propsUrl</span>
                                         + &quot;'&quot; + &quot; with priority 
&quot; + priority);
                             }
 
-<span class="fc" id="L660">                            propsUrl = url;</span>
-<span class="fc" id="L661">                            props = newProps;</span>
-<span class="fc" id="L662">                            priority = 
newPriority;</span>
-<span class="pc bpc" id="L663" title="1 of 2 branches missed.">                
        } else if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L664">                            
logDiagnostic(&quot;[LOOKUP] Properties file at '&quot; + url + &quot;'&quot; + 
&quot; with priority &quot; + newPriority + &quot; does not override file at 
'&quot;</span>
+<span class="fc" id="L670">                            propsUrl = url;</span>
+<span class="fc" id="L671">                            props = newProps;</span>
+<span class="fc" id="L672">                            priority = 
newPriority;</span>
+<span class="pc bpc" id="L673" title="1 of 2 branches missed.">                
        } else if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L674">                            
logDiagnostic(&quot;[LOOKUP] Properties file at '&quot; + url + &quot;'&quot; + 
&quot; with priority &quot; + newPriority + &quot; does not override file at 
'&quot;</span>
                                     + propsUrl + &quot;'&quot; + &quot; with 
priority &quot; + priority);
                         }
                     }
 
                 }
-<span class="fc" id="L670">            }</span>
-<span class="nc" id="L671">        } catch (final SecurityException e) {</span>
-<span class="nc bnc" id="L672" title="All 2 branches missed.">            if 
(isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L673">                
logDiagnostic(&quot;SecurityException thrown while trying to find/read config 
files.&quot;);</span>
-            }
-<span class="fc" id="L675">        }</span>
-
-<span class="pc bpc" id="L677" title="1 of 2 branches missed.">        if 
(isDiagnosticsEnabled()) {</span>
-<span class="nc bnc" id="L678" title="All 2 branches missed.">            if 
(props == null) {</span>
-<span class="nc" id="L679">                logDiagnostic(&quot;[LOOKUP] No 
properties file of name '&quot; + fileName + &quot;' found.&quot;);</span>
+<span class="fc" id="L680">            }</span>
+<span class="nc" id="L681">        } catch (final SecurityException e) {</span>
+<span class="nc bnc" id="L682" title="All 2 branches missed.">            if 
(isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L683">                
logDiagnostic(&quot;SecurityException thrown while trying to find/read config 
files.&quot;);</span>
+            }
+<span class="fc" id="L685">        }</span>
+
+<span class="pc bpc" id="L687" title="1 of 2 branches missed.">        if 
(isDiagnosticsEnabled()) {</span>
+<span class="nc bnc" id="L688" title="All 2 branches missed.">            if 
(props == null) {</span>
+<span class="nc" id="L689">                logDiagnostic(&quot;[LOOKUP] No 
properties file of name '&quot; + fileName + &quot;' found.&quot;);</span>
             } else {
-<span class="nc" id="L681">                logDiagnostic(&quot;[LOOKUP] 
Properties file of name '&quot; + fileName + &quot;' found at '&quot; + 
propsUrl + '&quot;');</span>
+<span class="nc" id="L691">                logDiagnostic(&quot;[LOOKUP] 
Properties file of name '&quot; + fileName + &quot;' found at '&quot; + 
propsUrl + '&quot;');</span>
             }
         }
 
-<span class="fc" id="L685">        return props;</span>
+<span class="fc" id="L695">        return props;</span>
     }
 
     /**
@@ -691,11 +701,13 @@ public abstract class LogFactory {
      * In versions prior to 1.1, this method did not use an AccessController.
      * In version 1.1, an AccessController wrapper was incorrectly added to
      * this method, causing a minor security flaw.
+     * &lt;/p&gt;
      * &lt;p&gt;
      * In version 1.1.1 this change was reverted; this method no longer uses
      * an AccessController. User code wishing to obtain the context class 
loader
      * must invoke this method via AccessController.doPrivileged if it needs
      * support for that.
+     * &lt;/p&gt;
      *
      * @return the context class loader associated with the current thread,
      *  or null if security doesn't allow it.
@@ -703,7 +715,7 @@ public abstract class LogFactory {
      *  attempting to get the context class loader.
      */
     protected static ClassLoader getContextClassLoader() throws 
LogConfigurationException {
-<span class="nc" id="L706">        return directGetContextClassLoader();</span>
+<span class="nc" id="L718">        return directGetContextClassLoader();</span>
     }
 
     /**
@@ -721,7 +733,7 @@ public abstract class LogFactory {
      *  attempting to get the context class loader.
      */
     private static ClassLoader getContextClassLoaderInternal() throws 
LogConfigurationException {
-<span class="fc" id="L724">        return 
AccessController.doPrivileged((PrivilegedAction&lt;ClassLoader&gt;) 
LogFactory::directGetContextClassLoader);</span>
+<span class="fc" id="L736">        return 
AccessController.doPrivileged((PrivilegedAction&lt;ClassLoader&gt;) 
LogFactory::directGetContextClassLoader);</span>
     }
 
     /**
@@ -748,26 +760,26 @@ public abstract class LogFactory {
      */
     public static LogFactory getFactory() throws LogConfigurationException {
         // Identify the class loader we will be using
-<span class="fc" id="L751">        final ClassLoader contextClassLoader = 
getContextClassLoaderInternal();</span>
+<span class="fc" id="L763">        final ClassLoader contextClassLoader = 
getContextClassLoaderInternal();</span>
 
         // This is an odd enough situation to report about. This
         // output will be a nuisance on JDK1.1, as the system
         // class loader is null in that environment.
-<span class="pc bpc" id="L756" title="1 of 4 branches missed.">        if 
(contextClassLoader == null &amp;&amp; isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L757">            logDiagnostic(&quot;Context class 
loader is null.&quot;);</span>
+<span class="pc bpc" id="L768" title="1 of 4 branches missed.">        if 
(contextClassLoader == null &amp;&amp; isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L769">            logDiagnostic(&quot;Context class 
loader is null.&quot;);</span>
         }
 
         // Return any previously registered factory for this class loader
-<span class="fc" id="L761">        LogFactory factory = 
getCachedFactory(contextClassLoader);</span>
-<span class="fc bfc" id="L762" title="All 2 branches covered.">        if 
(factory != null) {</span>
-<span class="fc" id="L763">            return factory;</span>
+<span class="fc" id="L773">        LogFactory factory = 
getCachedFactory(contextClassLoader);</span>
+<span class="fc bfc" id="L774" title="All 2 branches covered.">        if 
(factory != null) {</span>
+<span class="fc" id="L775">            return factory;</span>
         }
 
-<span class="pc bpc" id="L766" title="1 of 2 branches missed.">        if 
(isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L767">            logDiagnostic(</span>
+<span class="pc bpc" id="L778" title="1 of 2 branches missed.">        if 
(isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L779">            logDiagnostic(</span>
                     &quot;[LOOKUP] LogFactory implementation requested for the 
first time for context class loader &quot; +
-<span class="nc" id="L769">                    
objectId(contextClassLoader));</span>
-<span class="nc" id="L770">            logHierarchy(&quot;[LOOKUP] &quot;, 
contextClassLoader);</span>
+<span class="nc" id="L781">                    
objectId(contextClassLoader));</span>
+<span class="nc" id="L782">            logHierarchy(&quot;[LOOKUP] &quot;, 
contextClassLoader);</span>
         }
 
         // Load properties file.
@@ -780,16 +792,16 @@ public abstract class LogFactory {
         // As the properties file (if it exists) will be used one way or
         // another in the end we may as well look for it first.
 
-<span class="fc" id="L783">        final Properties props = 
getConfigurationFile(contextClassLoader, FACTORY_PROPERTIES);</span>
+<span class="fc" id="L795">        final Properties props = 
getConfigurationFile(contextClassLoader, FACTORY_PROPERTIES);</span>
 
         // Determine whether we will be using the thread context class loader 
to
         // load logging classes or not by checking the loaded properties file 
(if any).
-<span class="fc" id="L787">        ClassLoader baseClassLoader = 
contextClassLoader;</span>
-<span class="fc bfc" id="L788" title="All 2 branches covered.">        if 
(props != null) {</span>
-<span class="fc" id="L789">            final String useTCCLStr = 
props.getProperty(TCCL_KEY);</span>
+<span class="fc" id="L799">        ClassLoader baseClassLoader = 
contextClassLoader;</span>
+<span class="fc bfc" id="L800" title="All 2 branches covered.">        if 
(props != null) {</span>
+<span class="fc" id="L801">            final String useTCCLStr = 
props.getProperty(TCCL_KEY);</span>
             // The Boolean.valueOf(useTCCLStr).booleanValue() formulation
             // is required for Java 1.2 compatibility.
-<span class="pc bpc" id="L792" title="1 of 4 branches missed.">            if 
(useTCCLStr != null &amp;&amp; !Boolean.parseBoolean(useTCCLStr)) {</span>
+<span class="pc bpc" id="L804" title="1 of 4 branches missed.">            if 
(useTCCLStr != null &amp;&amp; !Boolean.parseBoolean(useTCCLStr)) {</span>
                 // Don't use current context class loader when locating any
                 // LogFactory or Log classes, just use the class that loaded
                 // this abstract class. When this class is deployed in a shared
@@ -797,49 +809,49 @@ public abstract class LogFactory {
                 // own logging implementations. It also means that it is up to 
the
                 // implementation whether to load library-specific config files
                 // from the TCCL or not.
-<span class="fc" id="L800">                baseClassLoader = 
thisClassLoaderRef.get();</span>
+<span class="fc" id="L812">                baseClassLoader = 
thisClassLoaderRef.get();</span>
             }
         }
 
         // Determine which concrete LogFactory subclass to use.
         // First, try a global system property
-<span class="pc bpc" id="L806" title="1 of 2 branches missed.">        if 
(isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L807">            logDiagnostic(&quot;[LOOKUP] Looking 
for system property [&quot; + FACTORY_PROPERTY +</span>
+<span class="pc bpc" id="L818" title="1 of 2 branches missed.">        if 
(isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L819">            logDiagnostic(&quot;[LOOKUP] Looking 
for system property [&quot; + FACTORY_PROPERTY +</span>
                           &quot;] to define the LogFactory subclass to 
use...&quot;);
         }
 
         try {
-<span class="fc" id="L812">            final String factoryClass = 
getSystemProperty(FACTORY_PROPERTY, null);</span>
-<span class="fc bfc" id="L813" title="All 2 branches covered.">            if 
(factoryClass != null) {</span>
-<span class="pc bpc" id="L814" title="1 of 2 branches missed.">                
if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L815">                    logDiagnostic(&quot;[LOOKUP] 
Creating an instance of LogFactory class '&quot; + factoryClass +</span>
+<span class="fc" id="L824">            final String factoryClass = 
getSystemProperty(FACTORY_PROPERTY, null);</span>
+<span class="fc bfc" id="L825" title="All 2 branches covered.">            if 
(factoryClass != null) {</span>
+<span class="pc bpc" id="L826" title="1 of 2 branches missed.">                
if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L827">                    logDiagnostic(&quot;[LOOKUP] 
Creating an instance of LogFactory class '&quot; + factoryClass +</span>
                                   &quot;' as specified by system property 
&quot; + FACTORY_PROPERTY);
                 }
-<span class="fc" id="L818">                factory = newFactory(factoryClass, 
baseClassLoader, contextClassLoader);</span>
-<span class="pc bpc" id="L819" title="1 of 2 branches missed.">            } 
else if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L820">                logDiagnostic(&quot;[LOOKUP] No 
system property [&quot; + FACTORY_PROPERTY + &quot;] defined.&quot;);</span>
-            }
-<span class="nc" id="L822">        } catch (final SecurityException e) {</span>
-<span class="nc bnc" id="L823" title="All 2 branches missed.">            if 
(isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L824">                logDiagnostic(&quot;[LOOKUP] A 
security exception occurred while trying to create an&quot; +</span>
-<span class="nc" id="L825">                              &quot; instance of 
the custom factory class&quot; + &quot;: [&quot; + trim(e.getMessage()) +</span>
+<span class="fc" id="L830">                factory = newFactory(factoryClass, 
baseClassLoader, contextClassLoader);</span>
+<span class="pc bpc" id="L831" title="1 of 2 branches missed.">            } 
else if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L832">                logDiagnostic(&quot;[LOOKUP] No 
system property [&quot; + FACTORY_PROPERTY + &quot;] defined.&quot;);</span>
+            }
+<span class="fc" id="L834">        } catch (final SecurityException e) {</span>
+<span class="pc bpc" id="L835" title="1 of 2 branches missed.">            if 
(isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L836">                logDiagnostic(&quot;[LOOKUP] A 
security exception occurred while trying to create an&quot; +</span>
+<span class="nc" id="L837">                              &quot; instance of 
the custom factory class&quot; + &quot;: [&quot; + trim(e.getMessage()) +</span>
                               &quot;]. Trying alternative 
implementations...&quot;);
             }
             // ignore
-<span class="nc" id="L829">        } catch (final RuntimeException e) {</span>
+<span class="nc" id="L841">        } catch (final RuntimeException e) {</span>
             // This is not consistent with the behavior when a bad LogFactory 
class is
             // specified in a services file.
             //
             // One possible exception that can occur here is a 
ClassCastException when
             // the specified class wasn't castable to this LogFactory type.
-<span class="nc bnc" id="L835" title="All 2 branches missed.">            if 
(isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L836">                logDiagnostic(&quot;[LOOKUP] An 
exception occurred while trying to create an&quot; +</span>
+<span class="nc bnc" id="L847" title="All 2 branches missed.">            if 
(isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L848">                logDiagnostic(&quot;[LOOKUP] An 
exception occurred while trying to create an&quot; +</span>
                               &quot; instance of the custom factory 
class&quot; + &quot;: [&quot; +
-<span class="nc" id="L838">                              trim(e.getMessage()) 
+</span>
+<span class="nc" id="L850">                              trim(e.getMessage()) 
+</span>
                               &quot;] as specified by a system 
property.&quot;);
             }
-<span class="nc" id="L841">            throw e;</span>
-<span class="pc" id="L842">        }</span>
+<span class="nc" id="L853">            throw e;</span>
+<span class="fc" id="L854">        }</span>
 
         // Second, try to find a service by using the JDK 1.3 class
         // discovery mechanism, which involves putting a file with the name
@@ -847,69 +859,67 @@ public abstract class LogFactory {
         // contents of the file is a single line specifying a concrete class
         // that implements the desired interface.
 
-<span class="fc bfc" id="L850" title="All 2 branches covered.">        if 
(factory == null) {</span>
-<span class="pc bpc" id="L851" title="1 of 2 branches missed.">            if 
(isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L852">                logDiagnostic(&quot;[LOOKUP] Using 
ServiceLoader  to define the LogFactory subclass to use...&quot;);</span>
+<span class="fc bfc" id="L862" title="All 2 branches covered.">        if 
(factory == null) {</span>
+<span class="pc bpc" id="L863" title="1 of 2 branches missed.">            if 
(isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L864">                logDiagnostic(&quot;[LOOKUP] Using 
ServiceLoader  to define the LogFactory subclass to use...&quot;);</span>
             }
             try {
-<span class="fc" id="L855">                final 
ServiceLoader&lt;LogFactory&gt; serviceLoader = 
ServiceLoader.load(LogFactory.class);</span>
-<span class="fc" id="L856">                final Iterator&lt;LogFactory&gt; 
iterator = serviceLoader.iterator();</span>
+<span class="fc" id="L867">                final 
ServiceLoader&lt;LogFactory&gt; serviceLoader = 
ServiceLoader.load(LogFactory.class);</span>
+<span class="fc" id="L868">                final Iterator&lt;LogFactory&gt; 
iterator = serviceLoader.iterator();</span>
 
-<span class="fc" id="L858">                int i = MAX_BROKEN_SERVICES;</span>
-<span class="fc bfc" id="L859" title="All 4 branches covered.">                
while (factory == null &amp;&amp; i-- &gt; 0) {</span>
+<span class="fc" id="L870">                int i = MAX_BROKEN_SERVICES;</span>
+<span class="fc bfc" id="L871" title="All 4 branches covered.">                
while (factory == null &amp;&amp; i-- &gt; 0) {</span>
                     try {
-<span class="fc bfc" id="L861" title="All 2 branches covered.">                
        if (iterator.hasNext()) {</span>
-<span class="fc" id="L862">                            factory = 
iterator.next();</span>
+<span class="fc bfc" id="L873" title="All 2 branches covered.">                
        if (iterator.hasNext()) {</span>
+<span class="fc" id="L874">                            factory = 
iterator.next();</span>
                         }
-<span class="fc" id="L864">                    } catch (final 
ServiceConfigurationError | LinkageError ex) {</span>
-<span class="pc bpc" id="L865" title="1 of 2 branches missed.">                
        if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L866">                            
logDiagnostic(&quot;[LOOKUP] An exception occurred while trying to find 
an&quot; +</span>
+<span class="fc" id="L876">                    } catch (final 
ServiceConfigurationError | LinkageError ex) {</span>
+<span class="pc bpc" id="L877" title="1 of 2 branches missed.">                
        if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L878">                            
logDiagnostic(&quot;[LOOKUP] An exception occurred while trying to find 
an&quot; +</span>
                                     &quot; instance of LogFactory&quot; +
-<span class="nc" id="L868">                                    &quot;: [&quot; 
+ trim(ex.getMessage()) +</span>
+<span class="nc" id="L880">                                    &quot;: [&quot; 
+ trim(ex.getMessage()) +</span>
                                     &quot;]. Trying alternative 
implementations...&quot;);
                         }
-<span class="fc" id="L871">                    }</span>
+<span class="fc" id="L883">                    }</span>
                 }
-<span class="nc" id="L873">            } catch (final Exception ex) {</span>
+<span class="nc" id="L885">            } catch (final Exception ex) {</span>
                 // note: if the specified LogFactory class wasn't compatible 
with LogFactory
                 // for some reason, a ClassCastException will be caught here, 
and attempts will
                 // continue to find a compatible class.
-<span class="nc bnc" id="L877" title="All 2 branches missed.">                
if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L878">                    logDiagnostic(</span>
+<span class="nc bnc" id="L889" title="All 2 branches missed.">                
if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L890">                    logDiagnostic(</span>
                         &quot;[LOOKUP] A security exception occurred while 
trying to create an&quot; +
                         &quot; instance of the custom factory class&quot; +
-<span class="nc" id="L881">                        &quot;: [&quot; + 
trim(ex.getMessage()) +</span>
+<span class="nc" id="L893">                        &quot;: [&quot; + 
trim(ex.getMessage()) +</span>
                         &quot;]. Trying alternative implementations...&quot;);
                 }
                 // ignore
-<span class="fc" id="L885">            }</span>
+<span class="fc" id="L897">            }</span>
         }
 
         // Third try looking into the properties file read earlier (if found)
 
-<span class="fc bfc" id="L890" title="All 2 branches covered.">        if 
(factory == null) {</span>
-<span class="fc bfc" id="L891" title="All 2 branches covered.">            if 
(props != null) {</span>
-<span class="pc bpc" id="L892" title="1 of 2 branches missed.">                
if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L893">                    logDiagnostic(</span>
+<span class="fc bfc" id="L902" title="All 2 branches covered.">        if 
(factory == null) {</span>
+<span class="fc bfc" id="L903" title="All 2 branches covered.">            if 
(props != null) {</span>
+<span class="pc bpc" id="L904" title="1 of 2 branches missed.">                
if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L905">                    logDiagnostic(</span>
                         &quot;[LOOKUP] Looking in properties file for entry 
with key '&quot; + FACTORY_PROPERTY +
                         &quot;' to define the LogFactory subclass to 
use...&quot;);
                 }
-<span class="fc" id="L897">                final String factoryClass = 
props.getProperty(FACTORY_PROPERTY);</span>
-<span class="fc bfc" id="L898" title="All 2 branches covered.">                
if (factoryClass != null) {</span>
-<span class="pc bpc" id="L899" title="1 of 2 branches missed.">                
    if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L900">                        logDiagnostic(</span>
+<span class="fc" id="L909">                final String factoryClass = 
props.getProperty(FACTORY_PROPERTY);</span>
+<span class="fc bfc" id="L910" title="All 2 branches covered.">                
if (factoryClass != null) {</span>
+<span class="pc bpc" id="L911" title="1 of 2 branches missed.">                
    if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L912">                        logDiagnostic(</span>
                             &quot;[LOOKUP] Properties file specifies 
LogFactory subclass '&quot; + factoryClass + &quot;'&quot;);
                     }
-<span class="fc" id="L903">                    factory = 
newFactory(factoryClass, baseClassLoader, contextClassLoader);</span>
+<span class="fc" id="L915">                    factory = 
newFactory(factoryClass, baseClassLoader, contextClassLoader);</span>
 
                     // TODO: think about whether we need to handle exceptions 
from newFactory
-                } else {
-<span class="pc bpc" id="L907" title="1 of 2 branches missed.">                
    if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L908">                        
logDiagnostic(&quot;[LOOKUP] Properties file has no entry specifying LogFactory 
subclass.&quot;);</span>
-                    }
+<span class="pc bpc" id="L918" title="1 of 2 branches missed.">                
} else if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L919">                    logDiagnostic(&quot;[LOOKUP] 
Properties file has no entry specifying LogFactory subclass.&quot;);</span>
                 }
-<span class="pc bpc" id="L911" title="1 of 2 branches missed.">            } 
else if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L912">                logDiagnostic(&quot;[LOOKUP] No 
properties file available to determine&quot; + &quot; LogFactory subclass 
from..&quot;);</span>
+<span class="pc bpc" id="L921" title="1 of 2 branches missed.">            } 
else if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L922">                logDiagnostic(&quot;[LOOKUP] No 
properties file available to determine&quot; + &quot; LogFactory subclass 
from..&quot;);</span>
             }
         }
 
@@ -917,29 +927,29 @@ public abstract class LogFactory {
 
         try {
             // We prefer Log4j API, since it does not stringify objects.
-<span class="fc bfc" id="L920" title="All 4 branches covered.">            if 
(factory == null &amp;&amp; isClassAvailable(LOG4J_API_LOGGER, 
baseClassLoader)) {</span>
+<span class="fc bfc" id="L930" title="All 4 branches covered.">            if 
(factory == null &amp;&amp; isClassAvailable(LOG4J_API_LOGGER, 
baseClassLoader)) {</span>
                 // If the Log4j API is redirected to SLF4J, we use SLF4J 
directly.
-<span class="fc bfc" id="L922" title="All 2 branches covered.">                
if (isClassAvailable(LOG4J_TO_SLF4J_BRIDGE, baseClassLoader)) {</span>
-<span class="fc" id="L923">                    logDiagnostic(</span>
+<span class="fc bfc" id="L932" title="All 2 branches covered.">                
if (isClassAvailable(LOG4J_TO_SLF4J_BRIDGE, baseClassLoader)) {</span>
+<span class="fc" id="L933">                    logDiagnostic(</span>
                             &quot;[LOOKUP] Log4j API to SLF4J redirection 
detected. Loading the SLF4J LogFactory implementation '&quot; + FACTORY_SLF4J + 
&quot;'.&quot;);
-<span class="fc" id="L925">                    factory = 
newFactory(FACTORY_SLF4J, baseClassLoader, contextClassLoader);</span>
+<span class="fc" id="L935">                    factory = 
newFactory(FACTORY_SLF4J, baseClassLoader, contextClassLoader);</span>
                 } else {
-<span class="fc" id="L927">                    logDiagnostic(&quot;[LOOKUP] 
Log4j API detected. Loading the Log4j API LogFactory implementation '&quot; + 
FACTORY_LOG4J_API + &quot;'.&quot;);</span>
-<span class="fc" id="L928">                    factory = 
newFactory(FACTORY_LOG4J_API, baseClassLoader, contextClassLoader);</span>
+<span class="fc" id="L937">                    logDiagnostic(&quot;[LOOKUP] 
Log4j API detected. Loading the Log4j API LogFactory implementation '&quot; + 
FACTORY_LOG4J_API + &quot;'.&quot;);</span>
+<span class="fc" id="L938">                    factory = 
newFactory(FACTORY_LOG4J_API, baseClassLoader, contextClassLoader);</span>
                 }
             }
 
-<span class="fc bfc" id="L932" title="All 4 branches covered.">            if 
(factory == null &amp;&amp; isClassAvailable(SLF4J_API_LOGGER, 
baseClassLoader)) {</span>
-<span class="fc" id="L933">                logDiagnostic(&quot;[LOOKUP] SLF4J 
detected. Loading the SLF4J LogFactory implementation '&quot; + FACTORY_SLF4J + 
&quot;'.&quot;);</span>
-<span class="fc" id="L934">                factory = newFactory(FACTORY_SLF4J, 
baseClassLoader, contextClassLoader);</span>
-            }
-<span class="nc" id="L936">        } catch (final Exception e) {</span>
-<span class="nc" id="L937">            logDiagnostic(&quot;[LOOKUP] An 
exception occurred while creating LogFactory: &quot; + e.getMessage());</span>
-<span class="fc" id="L938">        }</span>
-
-<span class="fc bfc" id="L940" title="All 2 branches covered.">        if 
(factory == null) {</span>
-<span class="pc bpc" id="L941" title="1 of 2 branches missed.">            if 
(isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L942">                logDiagnostic(</span>
+<span class="fc bfc" id="L942" title="All 4 branches covered.">            if 
(factory == null &amp;&amp; isClassAvailable(SLF4J_API_LOGGER, 
baseClassLoader)) {</span>
+<span class="fc" id="L943">                logDiagnostic(&quot;[LOOKUP] SLF4J 
detected. Loading the SLF4J LogFactory implementation '&quot; + FACTORY_SLF4J + 
&quot;'.&quot;);</span>
+<span class="fc" id="L944">                factory = newFactory(FACTORY_SLF4J, 
baseClassLoader, contextClassLoader);</span>
+            }
+<span class="fc" id="L946">        } catch (final Exception e) {</span>
+<span class="fc" id="L947">            logDiagnostic(&quot;[LOOKUP] An 
exception occurred while creating LogFactory: &quot; + e.getMessage());</span>
+<span class="fc" id="L948">        }</span>
+
+<span class="fc bfc" id="L950" title="All 2 branches covered.">        if 
(factory == null) {</span>
+<span class="pc bpc" id="L951" title="1 of 2 branches missed.">            if 
(isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L952">                logDiagnostic(</span>
                     &quot;[LOOKUP] Loading the default LogFactory 
implementation '&quot; + FACTORY_DEFAULT +
                     &quot;' via the same class loader that loaded this 
LogFactory&quot; +
                     &quot; class (ie not looking in the context class 
loader).&quot;);
@@ -954,26 +964,26 @@ public abstract class LogFactory {
             // version of the LogFactoryImpl class and have it used dynamically
             // by an old LogFactory class in the parent, but that isn't
             // necessarily a good idea anyway.
-<span class="fc" id="L957">            factory = newFactory(FACTORY_DEFAULT, 
thisClassLoaderRef.get(), contextClassLoader);</span>
+<span class="fc" id="L967">            factory = newFactory(FACTORY_DEFAULT, 
thisClassLoaderRef.get(), contextClassLoader);</span>
         }
 
-<span class="pc bpc" id="L960" title="1 of 2 branches missed.">        if 
(factory != null) {</span>
+<span class="pc bpc" id="L970" title="1 of 2 branches missed.">        if 
(factory != null) {</span>
             /**
              * Always cache using context class loader.
              */
-<span class="fc" id="L964">            cacheFactory(contextClassLoader, 
factory);</span>
+<span class="fc" id="L974">            cacheFactory(contextClassLoader, 
factory);</span>
 
-<span class="fc bfc" id="L966" title="All 2 branches covered.">            if 
(props != null) {</span>
-<span class="fc" id="L967">                final Enumeration&lt;?&gt; names = 
props.propertyNames();</span>
-<span class="fc bfc" id="L968" title="All 2 branches covered.">                
while (names.hasMoreElements()) {</span>
-<span class="fc" id="L969">                    final String name = 
Objects.toString(names.nextElement(), null);</span>
-<span class="fc" id="L970">                    final String value = 
props.getProperty(name);</span>
-<span class="fc" id="L971">                    factory.setAttribute(name, 
value);</span>
-<span class="fc" id="L972">                }</span>
+<span class="fc bfc" id="L976" title="All 2 branches covered.">            if 
(props != null) {</span>
+<span class="fc" id="L977">                final Enumeration&lt;?&gt; names = 
props.propertyNames();</span>
+<span class="fc bfc" id="L978" title="All 2 branches covered.">                
while (names.hasMoreElements()) {</span>
+<span class="fc" id="L979">                    final String name = 
Objects.toString(names.nextElement(), null);</span>
+<span class="fc" id="L980">                    final String value = 
props.getProperty(name);</span>
+<span class="fc" id="L981">                    factory.setAttribute(name, 
value);</span>
+<span class="fc" id="L982">                }</span>
             }
         }
 
-<span class="fc" id="L976">        return factory;</span>
+<span class="fc" id="L986">        return factory;</span>
     }
 
     /**
@@ -984,7 +994,7 @@ public abstract class LogFactory {
      * @throws LogConfigurationException if a suitable {@code Log} instance 
cannot be returned
      */
     public static Log getLog(final Class&lt;?&gt; clazz) throws 
LogConfigurationException {
-<span class="fc" id="L987">        return 
getFactory().getInstance(clazz);</span>
+<span class="fc" id="L997">        return 
getFactory().getInstance(clazz);</span>
     }
 
     /**
@@ -996,7 +1006,7 @@ public abstract class LogFactory {
      * @throws LogConfigurationException if a suitable {@code Log} instance 
cannot be returned
      */
     public static Log getLog(final String name) throws 
LogConfigurationException {
-<span class="fc" id="L999">        return 
getFactory().getInstance(name);</span>
+<span class="fc" id="L1009">        return 
getFactory().getInstance(name);</span>
     }
 
     /**
@@ -1006,33 +1016,34 @@ public abstract class LogFactory {
      * This method must therefore remain private to avoid security issues.
      * &lt;p&gt;
      * {@code Null} is returned if the URL cannot be opened.
+     * &lt;/p&gt;
      */
     private static Properties getProperties(final URL url) {
-<span class="fc" id="L1011">        return 
AccessController.doPrivileged((PrivilegedAction&lt;Properties&gt;) () -&gt; 
{</span>
+<span class="fc" id="L1022">        return 
AccessController.doPrivileged((PrivilegedAction&lt;Properties&gt;) () -&gt; 
{</span>
             // We must ensure that useCaches is set to false, as the
             // default behavior of java is to cache file handles, and
             // this &quot;locks&quot; files, preventing hot-redeploy on 
windows.
             try {
-<span class="fc" id="L1016">                final URLConnection connection = 
url.openConnection();</span>
-<span class="fc" id="L1017">                
connection.setUseCaches(false);</span>
-<span class="fc" id="L1018">                try (InputStream stream = 
connection.getInputStream()) {</span>
-<span class="pc bpc" id="L1019" title="1 of 2 branches missed.">               
     if (stream != null) {</span>
-<span class="fc" id="L1020">                        final Properties props = 
new Properties();</span>
-<span class="fc" id="L1021">                        props.load(stream);</span>
-<span class="fc" id="L1022">                        return props;</span>
+<span class="fc" id="L1027">                final URLConnection connection = 
url.openConnection();</span>
+<span class="fc" id="L1028">                
connection.setUseCaches(false);</span>
+<span class="fc" id="L1029">                try (InputStream stream = 
connection.getInputStream()) {</span>
+<span class="pc bpc" id="L1030" title="1 of 2 branches missed.">               
     if (stream != null) {</span>
+<span class="fc" id="L1031">                        final Properties props = 
new Properties();</span>
+<span class="fc" id="L1032">                        props.load(stream);</span>
+<span class="fc" id="L1033">                        return props;</span>
                     }
-<span class="pc bpc" id="L1024" title="1 of 2 branches missed.">               
 } catch (final IOException e) {</span>
-<span class="nc bnc" id="L1025" title="All 2 branches missed.">                
    if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L1026">                        logDiagnostic(&quot;Unable 
to close stream for URL &quot; + url);</span>
+<span class="pc bpc" id="L1035" title="1 of 2 branches missed.">               
 } catch (final IOException e) {</span>
+<span class="nc bnc" id="L1036" title="All 2 branches missed.">                
    if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L1037">                        logDiagnostic(&quot;Unable 
to close stream for URL &quot; + url);</span>
                     }
-<span class="nc" id="L1028">                }</span>
-<span class="nc" id="L1029">            } catch (final IOException e) {</span>
-<span class="nc bnc" id="L1030" title="All 2 branches missed.">                
if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L1031">                    logDiagnostic(&quot;Unable to 
read URL &quot; + url);</span>
+<span class="nc" id="L1039">                }</span>
+<span class="nc" id="L1040">            } catch (final IOException e) {</span>
+<span class="nc bnc" id="L1041" title="All 2 branches missed.">                
if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L1042">                    logDiagnostic(&quot;Unable to 
read URL &quot; + url);</span>
                 }
-<span class="nc" id="L1033">            }</span>
+<span class="nc" id="L1044">            }</span>
 
-<span class="nc" id="L1035">            return null;</span>
+<span class="nc" id="L1046">            return null;</span>
         });
     }
 
@@ -1044,28 +1055,30 @@ public abstract class LogFactory {
      * operation is done under an AccessController so that this method will
      * succeed when this jarfile is privileged but the caller is not.
      * This method must therefore remain private to avoid security issues.
+     * &lt;/p&gt;
      * &lt;p&gt;
      * If no instances are found, an Enumeration is returned whose
      * hasMoreElements method returns false (ie an &quot;empty&quot; 
enumeration).
      * If resources could not be listed for some reason, null is returned.
+     * &lt;/p&gt;
      */
     private static Enumeration&lt;URL&gt; getResources(final ClassLoader 
loader, final String name) {
-<span class="fc" id="L1053">        return 
AccessController.doPrivileged((PrivilegedAction&lt;Enumeration&lt;URL&gt;&gt;) 
() -&gt; {</span>
+<span class="fc" id="L1066">        return 
AccessController.doPrivileged((PrivilegedAction&lt;Enumeration&lt;URL&gt;&gt;) 
() -&gt; {</span>
             try {
-<span class="fc bfc" id="L1055" title="All 2 branches covered.">               
 if (loader != null) {</span>
-<span class="fc" id="L1056">                    return 
loader.getResources(name);</span>
+<span class="fc bfc" id="L1068" title="All 2 branches covered.">               
 if (loader != null) {</span>
+<span class="fc" id="L1069">                    return 
loader.getResources(name);</span>
                 }
-<span class="fc" id="L1058">                return 
ClassLoader.getSystemResources(name);</span>
-<span class="nc" id="L1059">            } catch (final IOException e) {</span>
-<span class="nc bnc" id="L1060" title="All 2 branches missed.">                
if (isDiagnosticsEnabled()) {</span>
-<span class="nc" id="L1061">                    logDiagnostic(&quot;Exception 
while trying to find configuration file &quot; + name + &quot;:&quot; + 
e.getMessage());</span>
+<span class="fc" id="L1071">                return 
ClassLoader.getSystemResources(name);</span>
+<span class="nc" id="L1072">            } catch (final IOException e) {</span>
+<span class="nc bnc" id="L1073" title="All 2 branches missed.">                
if (isDiagnosticsEnabled()) {</span>
+<span class="nc" id="L1074">                    logDiagnostic(&quot;Exception 
while trying to find configuration file &quot; + name + &quot;:&quot; + 
e.getMessage());</span>
                 }
-<span class="nc" id="L1063">                return null;</span>
-<span class="nc" id="L1064">            } catch (final NoSuchMethodError e) 
{</span>
+<span class="nc" id="L1076">                return null;</span>
+<span class="nc" id="L1077">            } catch (final NoSuchMethodError e) 
{</span>
                 // we must be running on a 1.1 JVM which doesn't support
                 // ClassLoader.getSystemResources; just return null in
                 // this case.
-<span class="nc" id="L1068">                return null;</span>
+<span class="nc" id="L1081">                return null;</span>
             }
         });
     }
@@ -1078,10 +1091,11 @@ public abstract class LogFactory {
      * Take care not to expose the value returned by this method to the
      * calling application in any way; otherwise the calling app can use that
      * info to access data that should not be available to it.
+     * &lt;/p&gt;
      */
     private static String getSystemProperty(final String key, final String def)
             throws SecurityException {
-<span class="fc" id="L1084">        return 
AccessController.doPrivileged((PrivilegedAction&lt;String&gt;) () -&gt; 
System.getProperty(key, def));</span>
+<span class="fc" id="L1098">        return 
AccessController.doPrivileged((PrivilegedAction&lt;String&gt;) () -&gt; 
System.getProperty(key, def));</span>
     }
 
     /**
@@ -1097,14 +1111,14 @@ public abstract class LogFactory {
      * @param t the Throwable to check
      */
     protected static void handleThrowable(final Throwable t) {
-<span class="pc bpc" id="L1100" title="1 of 2 branches missed.">        if (t 
instanceof ThreadDeath) {</span>
-<span class="nc" id="L1101">            throw (ThreadDeath) t;</span>
+<span class="pc bpc" id="L1114" title="1 of 2 branches missed.">        if (t 
instanceof ThreadDeath) {</span>
+<span class="nc" id="L1115">            throw (ThreadDeath) t;</span>
         }
-<span class="pc bpc" id="L1103" title="1 of 2 branches missed.">        if (t 
instanceof VirtualMachineError) {</span>
-<span class="nc" id="L1104">            throw (VirtualMachineError) t;</span>
+<span class="pc bpc" id="L1117" title="1 of 2 branches missed.">        if (t 
instanceof VirtualMachineError) {</span>
+<span class="nc" id="L1118">            throw (VirtualMachineError) t;</span>
         }
         // All other instances of Throwable will be silently ignored
-<span class="fc" id="L1107">    }</span>
+<span class="fc" id="L1121">    }</span>
 
     /**
      * Determines whether the given class actually implements {@code 
LogFactory}.
@@ -1117,43 +1131,44 @@ public abstract class LogFactory {
      * @return true if the {@code logFactoryClass} does extend
      * {@code LogFactory} when that class is loaded via the same
      * class loader that loaded the {@code logFactoryClass}.
+     * &lt;/p&gt;
      */
     private static boolean implementsLogFactory(final Class&lt;?&gt; 
logFactoryClass) {
-<span class="nc" id="L1122">        boolean implementsLogFactory = 
false;</span>
-<span class="nc bnc" id="L1123" title="All 2 branches missed.">        if 
(logFactoryClass != null) {</span>
+<span class="nc" id="L1137">        boolean implementsLogFactory = 
false;</span>
+<span class="nc bnc" id="L1138" title="All 2 branches missed.">        if 
(logFactoryClass != null) {</span>
             try {
-<span class="nc" id="L1125">                final ClassLoader 
logFactoryClassLoader = logFactoryClass.getClassLoader();</span>
-<span class="nc bnc" id="L1126" title="All 2 branches missed.">                
if (logFactoryClassLoader == null) {</span>
-<span class="nc" id="L1127">                    logDiagnostic(&quot;[CUSTOM 
LOG FACTORY] was loaded by the boot class loader&quot;);</span>
+<span class="nc" id="L1140">                final ClassLoader 
logFactoryClassLoader = logFactoryClass.getClassLoader();</span>
+<span class="nc bnc" id="L1141" title="All 2 branches missed.">                
if (logFactoryClassLoader == null) {</span>
+<span class="nc" id="L1142">                    logDiagnostic(&quot;[CUSTOM 
LOG FACTORY] was loaded by the boot class loader&quot;);</span>
                 } else {
-<span class="nc" id="L1129">                    logHierarchy(&quot;[CUSTOM LOG 
FACTORY] &quot;, logFactoryClassLoader);</span>
-<span class="nc" id="L1130">                    final Class&lt;?&gt; 
factoryFromCustomLoader = 
Class.forName(&quot;org.apache.commons.logging.LogFactory&quot;, false, 
logFactoryClassLoader);</span>
-<span class="nc" id="L1131">                    implementsLogFactory = 
factoryFromCustomLoader.isAssignableFrom(logFactoryClass);</span>
-<span class="nc" id="L1132">                    final String 
logFactoryClassName = logFactoryClass.getName();</span>
-<span class="nc bnc" id="L1133" title="All 2 branches missed.">                
    if (implementsLogFactory) {</span>
-<span class="nc" id="L1134">                        
logDiagnostic(&quot;[CUSTOM LOG FACTORY] &quot; + logFactoryClassName + &quot; 
implements LogFactory but was loaded by an incompatible class 
loader.&quot;);</span>
+<span class="nc" id="L1144">                    logHierarchy(&quot;[CUSTOM LOG 
FACTORY] &quot;, logFactoryClassLoader);</span>
+<span class="nc" id="L1145">                    final Class&lt;?&gt; 
factoryFromCustomLoader = 
Class.forName(&quot;org.apache.commons.logging.LogFactory&quot;, false, 
logFactoryClassLoader);</span>
+<span class="nc" id="L1146">                    implementsLogFactory = 
factoryFromCustomLoader.isAssignableFrom(logFactoryClass);</span>
+<span class="nc" id="L1147">                    final String 
logFactoryClassName = logFactoryClass.getName();</span>
+<span class="nc bnc" id="L1148" title="All 2 branches missed.">                
    if (implementsLogFactory) {</span>
+<span class="nc" id="L1149">                        
logDiagnostic(&quot;[CUSTOM LOG FACTORY] &quot; + logFactoryClassName + &quot; 
implements LogFactory but was loaded by an incompatible class 
loader.&quot;);</span>
                     } else {
-<span class="nc" id="L1136">                        
logDiagnostic(&quot;[CUSTOM LOG FACTORY] &quot; + logFactoryClassName + &quot; 
does not implement LogFactory.&quot;);</span>
+<span class="nc" id="L1151">                        
logDiagnostic(&quot;[CUSTOM LOG FACTORY] &quot; + logFactoryClassName + &quot; 
does not implement LogFactory.&quot;);</span>
                     }
                 }
-<span class="nc" id="L1139">            } catch (final SecurityException e) 
{</span>
+<span class="nc" id="L1154">            } catch (final SecurityException e) 
{</span>
                 //
                 // The application is running within a hostile security 
environment.
                 // This will make it very hard to diagnose issues with JCL.
                 // Consider running less securely whilst debugging this issue.
                 //
-<span class="nc" id="L1145">                logDiagnostic(&quot;[CUSTOM LOG 
FACTORY] SecurityException caught trying to determine whether &quot;</span>
-<span class="nc" id="L1146">                        + &quot;the compatibility 
was caused by a class loader conflict: &quot; + e.getMessage());</span>
-<span class="nc" id="L1147">            } catch (final LinkageError e) {</span>
+<span class="nc" id="L1160">                logDiagnostic(&quot;[CUSTOM LOG 
FACTORY] SecurityException caught trying to determine whether &quot;</span>
+<span class="nc" id="L1161">                        + &quot;the compatibility 
was caused by a class loader conflict: &quot; + e.getMessage());</span>
+<span class="nc" id="L1162">            } catch (final LinkageError e) {</span>
                 //
                 // This should be an unusual circumstance.
                 // LinkageError's usually indicate that a dependent class has 
incompatibly changed.
                 // Another possibility may be an exception thrown by an 
initializer.
                 // Time for a clean rebuild?
                 //
-<span class="nc" id="L1154">                logDiagnostic(&quot;[CUSTOM LOG 
FACTORY] LinkageError caught trying to determine whether &quot;</span>
-<span class="nc" id="L1155">                        + &quot;the compatibility 
was caused by a class loader conflict: &quot; + e.getMessage());</span>
-<span class="nc" id="L1156">            } catch (final ClassNotFoundException 
e) {</span>
+<span class="nc" id="L1169">                logDiagnostic(&quot;[CUSTOM LOG 
FACTORY] LinkageError caught trying to determine whether &quot;</span>
+<span class="nc" id="L1170">                        + &quot;the compatibility 
was caused by a class loader conflict: &quot; + e.getMessage());</span>
+<span class="nc" id="L1171">            } catch (final ClassNotFoundException 
e) {</span>
                 //
                 // LogFactory cannot be loaded by the class loader which 
loaded the custom factory implementation.
                 // The custom implementation is not viable until this is 
corrected.
@@ -1161,11 +1176,11 @@ public abstract class LogFactory {
                 // Running with diagnostics on should give information about 
the class loaders used
                 // to load the custom factory.
                 //
-<span class="nc" id="L1164">                logDiagnostic(&quot;[CUSTOM LOG 
FACTORY] LogFactory class cannot be loaded by the class loader which loaded 
&quot;</span>
+<span class="nc" id="L1179">                logDiagnostic(&quot;[CUSTOM LOG 
FACTORY] LogFactory class cannot be loaded by the class loader which loaded 
&quot;</span>
                         + &quot;the custom LogFactory implementation. Is the 
custom factory in the right class loader?&quot;);
-<span class="nc" id="L1166">            }</span>
+<span class="nc" id="L1181">            }</span>
         }
-<span class="nc" id="L1168">        return implementsLogFactory;</span>
+<span class="nc" id="L1183">        return implementsLogFactory;</span>
     }
 
     /**
@@ -1177,42 +1192,42 @@ public abstract class LogFactory {
     private static PrintStream initDiagnostics() {
         String dest;
         try {
-<span class="fc" id="L1180">            dest = 
getSystemProperty(DIAGNOSTICS_DEST_PROPERTY, null);</span>

[... 444 lines stripped ...]


Reply via email to