You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2016/02/20 19:30:05 UTC

svn commit: r1731437 [45/50] - in /webservices/website/axiom-staging: ./ apidocs/ apidocs/org/apache/axiom/mime/ apidocs/org/apache/axiom/om/ apidocs/org/apache/axiom/om/impl/builder/ apidocs/org/apache/axiom/om/impl/builder/class-use/ axiom-compat/ ax...

Modified: webservices/website/axiom-staging/code-coverage/org.apache.axiom.om.util/StAXUtils.java.html
URL: http://svn.apache.org/viewvc/webservices/website/axiom-staging/code-coverage/org.apache.axiom.om.util/StAXUtils.java.html?rev=1731437&r1=1731436&r2=1731437&view=diff
==============================================================================
--- webservices/website/axiom-staging/code-coverage/org.apache.axiom.om.util/StAXUtils.java.html (original)
+++ webservices/website/axiom-staging/code-coverage/org.apache.axiom.om.util/StAXUtils.java.html Sat Feb 20 18:30:02 2016
@@ -43,7 +43,6 @@ import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 import java.util.Properties;
 import java.util.WeakHashMap;
@@ -85,8 +84,8 @@ import java.util.WeakHashMap;
  *       This property is Woodstox specific.</dd>
  * </dl>
  */
-<span class="nc" id="L88">public class StAXUtils {</span>
-<span class="fc" id="L89">    private static final Log log = LogFactory.getLog(StAXUtils.class);</span>
+<span class="nc" id="L87">public class StAXUtils {</span>
+<span class="fc" id="L88">    private static final Log log = LogFactory.getLog(StAXUtils.class);</span>
     
     // If isFactoryPerClassLoader is true (default), then 
     // a separate singleton XMLInputFactory and XMLOutputFactory is maintained
@@ -96,21 +95,21 @@ import java.util.WeakHashMap;
     // If isFactoryPerClassLoader is false, then
     // a single XMLInputFactory and XMLOutputFactory is constructed using
     // the classloader that loaded StAXUtils. 
-<span class="fc" id="L99">    private static boolean isFactoryPerClassLoader = true;</span>
+<span class="fc" id="L98">    private static boolean isFactoryPerClassLoader = true;</span>
     
     // These static singletons are used when the XML*Factory is created with
     // the StAXUtils classloader.
-<span class="fc" id="L103">    private static final Map/*&lt;StAXParserConfiguration,XMLInputFactory&gt;*/ inputFactoryMap</span>
-            = Collections.synchronizedMap(new WeakHashMap());
-<span class="fc" id="L105">    private static final Map/*&lt;StAXWriterConfiguration,XMLOutputFactory&gt;*/ outputFactoryMap</span>
-            = Collections.synchronizedMap(new WeakHashMap());
+<span class="fc" id="L102">    private static final Map&lt;StAXParserConfiguration,XMLInputFactory&gt; inputFactoryMap</span>
+            = Collections.synchronizedMap(new WeakHashMap&lt;StAXParserConfiguration,XMLInputFactory&gt;());
+<span class="fc" id="L104">    private static final Map&lt;StAXWriterConfiguration,XMLOutputFactory&gt; outputFactoryMap</span>
+            = Collections.synchronizedMap(new WeakHashMap&lt;StAXWriterConfiguration,XMLOutputFactory&gt;());
     
     // These maps are used for the isFactoryPerClassLoader==true case
     // The maps are synchronized and weak.
-<span class="fc" id="L110">    private static final Map/*&lt;StAXParserConfiguration,Map&lt;ClassLoader,XMLInputFactory&gt;&gt;*/ inputFactoryPerCLMap</span>
-            = Collections.synchronizedMap(new WeakHashMap());
-<span class="fc" id="L112">    private static final Map/*&lt;StAXWriterConfiguration,Map&lt;ClassLoader,XMLInputFactory&gt;&gt;*/ outputFactoryPerCLMap</span>
-            = Collections.synchronizedMap(new WeakHashMap());
+<span class="fc" id="L109">    private static final Map&lt;StAXParserConfiguration,Map&lt;ClassLoader,XMLInputFactory&gt;&gt; inputFactoryPerCLMap</span>
+            = Collections.synchronizedMap(new WeakHashMap&lt;StAXParserConfiguration,Map&lt;ClassLoader,XMLInputFactory&gt;&gt;());
+<span class="fc" id="L111">    private static final Map&lt;StAXWriterConfiguration,Map&lt;ClassLoader,XMLOutputFactory&gt;&gt; outputFactoryPerCLMap</span>
+            = Collections.synchronizedMap(new WeakHashMap&lt;StAXWriterConfiguration,Map&lt;ClassLoader,XMLOutputFactory&gt;&gt;());
     
     /**
      * Get a cached {@link XMLInputFactory} instance using the default
@@ -119,7 +118,7 @@ import java.util.WeakHashMap;
      * @return an {@link XMLInputFactory} instance.
      */
     public static XMLInputFactory getXMLInputFactory() {
-<span class="fc" id="L122">        return getXMLInputFactory(null, isFactoryPerClassLoader);</span>
+<span class="fc" id="L121">        return getXMLInputFactory(null, isFactoryPerClassLoader);</span>
     }
     
     /**
@@ -131,7 +130,7 @@ import java.util.WeakHashMap;
      * @return an {@link XMLInputFactory} instance.
      */
     public static XMLInputFactory getXMLInputFactory(StAXParserConfiguration configuration) {
-<span class="fc" id="L134">        return getXMLInputFactory(configuration, isFactoryPerClassLoader);</span>
+<span class="fc" id="L133">        return getXMLInputFactory(configuration, isFactoryPerClassLoader);</span>
     }
     
     /**
@@ -145,7 +144,7 @@ import java.util.WeakHashMap;
      * @return an {@link XMLInputFactory} instance.
      */
     public static XMLInputFactory getXMLInputFactory(boolean factoryPerClassLoaderPolicy) {
-<span class="nc" id="L148">        return getXMLInputFactory(null, factoryPerClassLoaderPolicy);</span>
+<span class="nc" id="L147">        return getXMLInputFactory(null, factoryPerClassLoaderPolicy);</span>
     }
     
     /**
@@ -165,10 +164,10 @@ import java.util.WeakHashMap;
     public static XMLInputFactory getXMLInputFactory(StAXParserConfiguration configuration,
             boolean factoryPerClassLoaderPolicy) {
         
-<span class="fc bfc" id="L168" title="All 2 branches covered.">        if (factoryPerClassLoaderPolicy) {</span>
-<span class="fc" id="L169">            return getXMLInputFactory_perClassLoader(configuration);</span>
+<span class="fc bfc" id="L167" title="All 2 branches covered.">        if (factoryPerClassLoaderPolicy) {</span>
+<span class="fc" id="L168">            return getXMLInputFactory_perClassLoader(configuration);</span>
         } else {
-<span class="fc" id="L171">            return getXMLInputFactory_singleton(configuration);</span>
+<span class="fc" id="L170">            return getXMLInputFactory_singleton(configuration);</span>
         }
     }
 
@@ -179,64 +178,64 @@ import java.util.WeakHashMap;
      * @param factory An XMLInputFactory instance that is available for reuse
      */
     public static void releaseXMLInputFactory(XMLInputFactory factory) {
-<span class="nc" id="L182">    }</span>
+<span class="nc" id="L181">    }</span>
 
     public static XMLStreamReader createXMLStreamReader(InputStream in, String encoding)
             throws XMLStreamException {
         
-<span class="fc" id="L187">        return createXMLStreamReader(null, in, encoding);</span>
+<span class="fc" id="L186">        return createXMLStreamReader(null, in, encoding);</span>
     }
     
     public static XMLStreamReader createXMLStreamReader(StAXParserConfiguration configuration,
             InputStream in, String encoding) throws XMLStreamException {
         
-<span class="fc" id="L193">        XMLStreamReader reader = getXMLInputFactory(configuration).createXMLStreamReader(in, encoding);</span>
-<span class="pc bpc" id="L194" title="1 of 2 branches missed.">        if (log.isDebugEnabled()) {</span>
-<span class="nc" id="L195">            log.debug(&quot;XMLStreamReader is &quot; + reader.getClass().getName());</span>
+<span class="fc" id="L192">        XMLStreamReader reader = getXMLInputFactory(configuration).createXMLStreamReader(in, encoding);</span>
+<span class="pc bpc" id="L193" title="1 of 2 branches missed.">        if (log.isDebugEnabled()) {</span>
+<span class="nc" id="L194">            log.debug(&quot;XMLStreamReader is &quot; + reader.getClass().getName());</span>
         }
-<span class="fc" id="L197">        return reader;</span>
+<span class="fc" id="L196">        return reader;</span>
     }
 
     public static XMLStreamReader createXMLStreamReader(InputStream in)
             throws XMLStreamException {
         
-<span class="fc" id="L203">        return createXMLStreamReader(null, in);</span>
+<span class="fc" id="L202">        return createXMLStreamReader(null, in);</span>
     }
     
     public static XMLStreamReader createXMLStreamReader(StAXParserConfiguration configuration,
             InputStream in) throws XMLStreamException {
         
-<span class="fc" id="L209">        XMLStreamReader reader = getXMLInputFactory(configuration).createXMLStreamReader(in);</span>
-<span class="pc bpc" id="L210" title="1 of 2 branches missed.">        if (log.isDebugEnabled()) {</span>
-<span class="nc" id="L211">            log.debug(&quot;XMLStreamReader is &quot; + reader.getClass().getName());</span>
+<span class="fc" id="L208">        XMLStreamReader reader = getXMLInputFactory(configuration).createXMLStreamReader(in);</span>
+<span class="pc bpc" id="L209" title="1 of 2 branches missed.">        if (log.isDebugEnabled()) {</span>
+<span class="nc" id="L210">            log.debug(&quot;XMLStreamReader is &quot; + reader.getClass().getName());</span>
         }
-<span class="fc" id="L213">        return reader;</span>
+<span class="fc" id="L212">        return reader;</span>
     }
 
     public static XMLStreamReader createXMLStreamReader(StAXParserConfiguration configuration,
             String systemId, InputStream in) throws XMLStreamException {
         
-<span class="fc" id="L219">        XMLStreamReader reader = getXMLInputFactory(configuration).createXMLStreamReader(systemId, in);</span>
-<span class="pc bpc" id="L220" title="1 of 2 branches missed.">        if (log.isDebugEnabled()) {</span>
-<span class="nc" id="L221">            log.debug(&quot;XMLStreamReader is &quot; + reader.getClass().getName());</span>
+<span class="fc" id="L218">        XMLStreamReader reader = getXMLInputFactory(configuration).createXMLStreamReader(systemId, in);</span>
+<span class="pc bpc" id="L219" title="1 of 2 branches missed.">        if (log.isDebugEnabled()) {</span>
+<span class="nc" id="L220">            log.debug(&quot;XMLStreamReader is &quot; + reader.getClass().getName());</span>
         }
-<span class="fc" id="L223">        return reader;</span>
+<span class="fc" id="L222">        return reader;</span>
     }
 
     public static XMLStreamReader createXMLStreamReader(Reader in)
             throws XMLStreamException {
         
-<span class="fc" id="L229">        return createXMLStreamReader(null, in);</span>
+<span class="fc" id="L228">        return createXMLStreamReader(null, in);</span>
     }
     
     public static XMLStreamReader createXMLStreamReader(StAXParserConfiguration configuration,
             Reader in) throws XMLStreamException {
         
-<span class="fc" id="L235">        XMLStreamReader reader = getXMLInputFactory(configuration).createXMLStreamReader(in);</span>
-<span class="fc bfc" id="L236" title="All 2 branches covered.">        if (log.isDebugEnabled()) {</span>
-<span class="fc" id="L237">            log.debug(&quot;XMLStreamReader is &quot; + reader.getClass().getName());</span>
+<span class="fc" id="L234">        XMLStreamReader reader = getXMLInputFactory(configuration).createXMLStreamReader(in);</span>
+<span class="fc bfc" id="L235" title="All 2 branches covered.">        if (log.isDebugEnabled()) {</span>
+<span class="fc" id="L236">            log.debug(&quot;XMLStreamReader is &quot; + reader.getClass().getName());</span>
         }
-<span class="fc" id="L239">        return reader;</span>
+<span class="fc" id="L238">        return reader;</span>
     }
 
     /**
@@ -246,7 +245,7 @@ import java.util.WeakHashMap;
      * @return an {@link XMLOutputFactory} instance.
      */
     public static XMLOutputFactory getXMLOutputFactory() {
-<span class="fc" id="L249">        return getXMLOutputFactory(null, isFactoryPerClassLoader);</span>
+<span class="fc" id="L248">        return getXMLOutputFactory(null, isFactoryPerClassLoader);</span>
     }
     
     /**
@@ -258,7 +257,7 @@ import java.util.WeakHashMap;
      * @return an {@link XMLOutputFactory} instance.
      */
     public static XMLOutputFactory getXMLOutputFactory(StAXWriterConfiguration configuration) {
-<span class="fc" id="L261">        return getXMLOutputFactory(configuration, isFactoryPerClassLoader);</span>
+<span class="fc" id="L260">        return getXMLOutputFactory(configuration, isFactoryPerClassLoader);</span>
     }
     
     /**
@@ -272,7 +271,7 @@ import java.util.WeakHashMap;
      * @return an {@link XMLOutputFactory} instance.
      */
     public static XMLOutputFactory getXMLOutputFactory(boolean factoryPerClassLoaderPolicy) {
-<span class="nc" id="L275">        return getXMLOutputFactory(null, factoryPerClassLoaderPolicy);</span>
+<span class="nc" id="L274">        return getXMLOutputFactory(null, factoryPerClassLoaderPolicy);</span>
     }
     
     /**
@@ -292,10 +291,10 @@ import java.util.WeakHashMap;
     public static XMLOutputFactory getXMLOutputFactory(StAXWriterConfiguration configuration,
             boolean factoryPerClassLoaderPolicy) {
         
-<span class="fc bfc" id="L295" title="All 2 branches covered.">        if (factoryPerClassLoaderPolicy) {</span>
-<span class="fc" id="L296">            return getXMLOutputFactory_perClassLoader(configuration);</span>
+<span class="fc bfc" id="L294" title="All 2 branches covered.">        if (factoryPerClassLoaderPolicy) {</span>
+<span class="fc" id="L295">            return getXMLOutputFactory_perClassLoader(configuration);</span>
         } else {
-<span class="fc" id="L298">            return getXMLOutputFactory_singleton(configuration);</span>
+<span class="fc" id="L297">            return getXMLOutputFactory_singleton(configuration);</span>
         }
     }
 
@@ -305,8 +304,8 @@ import java.util.WeakHashMap;
      *  (default is true)
      */
     public static void setFactoryPerClassLoader(boolean value) {
-<span class="fc" id="L308">        isFactoryPerClassLoader = value;</span>
-<span class="fc" id="L309">    }</span>
+<span class="fc" id="L307">        isFactoryPerClassLoader = value;</span>
+<span class="fc" id="L308">    }</span>
 
     /**
      * @deprecated
@@ -315,58 +314,58 @@ import java.util.WeakHashMap;
      * @param factory An XMLOutputFactory instance that is available for reuse.
      */
     public static void releaseXMLOutputFactory(XMLOutputFactory factory) {
-<span class="nc" id="L318">    }</span>
+<span class="nc" id="L317">    }</span>
 
     public static XMLStreamWriter createXMLStreamWriter(OutputStream out)
             throws XMLStreamException {
         
-<span class="fc" id="L323">        return createXMLStreamWriter(null, out);</span>
+<span class="fc" id="L322">        return createXMLStreamWriter(null, out);</span>
     }
     
     public static XMLStreamWriter createXMLStreamWriter(StAXWriterConfiguration configuration,
             OutputStream out) throws XMLStreamException {
-<span class="fc" id="L328">        XMLStreamWriter writer = getXMLOutputFactory(configuration).createXMLStreamWriter(out, OMConstants.DEFAULT_CHAR_SET_ENCODING);</span>
-<span class="pc bpc" id="L329" title="1 of 2 branches missed.">        if (log.isDebugEnabled()) {</span>
-<span class="nc" id="L330">            log.debug(&quot;XMLStreamWriter is &quot; + writer.getClass().getName());</span>
+<span class="fc" id="L327">        XMLStreamWriter writer = getXMLOutputFactory(configuration).createXMLStreamWriter(out, OMConstants.DEFAULT_CHAR_SET_ENCODING);</span>
+<span class="pc bpc" id="L328" title="1 of 2 branches missed.">        if (log.isDebugEnabled()) {</span>
+<span class="nc" id="L329">            log.debug(&quot;XMLStreamWriter is &quot; + writer.getClass().getName());</span>
         }
-<span class="fc" id="L332">        return writer;</span>
+<span class="fc" id="L331">        return writer;</span>
     }
 
     public static XMLStreamWriter createXMLStreamWriter(OutputStream out, String encoding)
             throws XMLStreamException {
         
-<span class="fc" id="L338">        return createXMLStreamWriter(null, out, encoding);</span>
+<span class="fc" id="L337">        return createXMLStreamWriter(null, out, encoding);</span>
     }
     
     public static XMLStreamWriter createXMLStreamWriter(StAXWriterConfiguration configuration,
             OutputStream out, String encoding) throws XMLStreamException {
-<span class="fc" id="L343">        XMLStreamWriter writer = getXMLOutputFactory(configuration).createXMLStreamWriter(out, encoding);</span>
-<span class="fc bfc" id="L344" title="All 2 branches covered.">        if (log.isDebugEnabled()) {</span>
-<span class="fc" id="L345">            log.debug(&quot;XMLStreamWriter is &quot; + writer.getClass().getName());</span>
+<span class="fc" id="L342">        XMLStreamWriter writer = getXMLOutputFactory(configuration).createXMLStreamWriter(out, encoding);</span>
+<span class="fc bfc" id="L343" title="All 2 branches covered.">        if (log.isDebugEnabled()) {</span>
+<span class="fc" id="L344">            log.debug(&quot;XMLStreamWriter is &quot; + writer.getClass().getName());</span>
         }
-<span class="fc" id="L347">        return writer;</span>
+<span class="fc" id="L346">        return writer;</span>
     }
 
     public static XMLStreamWriter createXMLStreamWriter(final Writer out)
             throws XMLStreamException {
         
-<span class="fc" id="L353">        return createXMLStreamWriter(null, out);</span>
+<span class="fc" id="L352">        return createXMLStreamWriter(null, out);</span>
     }
     
     public static XMLStreamWriter createXMLStreamWriter(StAXWriterConfiguration configuration,
             Writer out) throws XMLStreamException {
-<span class="fc" id="L358">        XMLStreamWriter writer = getXMLOutputFactory(configuration).createXMLStreamWriter(out);</span>
-<span class="pc bpc" id="L359" title="1 of 2 branches missed.">        if (log.isDebugEnabled()) {</span>
-<span class="nc" id="L360">            log.debug(&quot;XMLStreamWriter is &quot; + writer.getClass().getName());</span>
+<span class="fc" id="L357">        XMLStreamWriter writer = getXMLOutputFactory(configuration).createXMLStreamWriter(out);</span>
+<span class="pc bpc" id="L358" title="1 of 2 branches missed.">        if (log.isDebugEnabled()) {</span>
+<span class="nc" id="L359">            log.debug(&quot;XMLStreamWriter is &quot; + writer.getClass().getName());</span>
         }
-<span class="fc" id="L362">        return writer;</span>
+<span class="fc" id="L361">        return writer;</span>
     }
 
     /**
      * @deprecated
      */
     public static void reset() {
-<span class="nc" id="L369">    }</span>
+<span class="nc" id="L368">    }</span>
     
     /**
      * Load factory properties from a resource. The context class loader is used to locate
@@ -377,46 +376,45 @@ import java.util.WeakHashMap;
      * @return the factory properties
      */
     // This has package access since it is used from within anonymous inner classes
-    static Map loadFactoryProperties(String name) {
-<span class="fc" id="L381">        ClassLoader cl = getContextClassLoader();</span>
-<span class="fc" id="L382">        InputStream in = cl.getResourceAsStream(name);</span>
-<span class="pc bpc" id="L383" title="1 of 2 branches missed.">        if (in == null) {</span>
-<span class="fc" id="L384">            return null;</span>
+    static Map&lt;String,Object&gt; loadFactoryProperties(String name) {
+<span class="fc" id="L380">        ClassLoader cl = getContextClassLoader();</span>
+<span class="fc" id="L381">        InputStream in = cl.getResourceAsStream(name);</span>
+<span class="pc bpc" id="L382" title="1 of 2 branches missed.">        if (in == null) {</span>
+<span class="fc" id="L383">            return null;</span>
         } else {
             try {
-<span class="nc" id="L387">                Properties rawProps = new Properties();</span>
-<span class="nc" id="L388">                Map props = new HashMap();</span>
-<span class="nc" id="L389">                rawProps.load(in);</span>
-<span class="nc bnc" id="L390" title="All 2 branches missed.">                for (Iterator it = rawProps.entrySet().iterator(); it.hasNext(); ) {</span>
-<span class="nc" id="L391">                    Map.Entry entry = (Map.Entry)it.next();</span>
-<span class="nc" id="L392">                    String strValue = (String)entry.getValue();</span>
+<span class="nc" id="L386">                Properties rawProps = new Properties();</span>
+<span class="nc" id="L387">                Map&lt;String,Object&gt; props = new HashMap&lt;String,Object&gt;();</span>
+<span class="nc" id="L388">                rawProps.load(in);</span>
+<span class="nc bnc" id="L389" title="All 2 branches missed.">                for (Map.Entry&lt;Object,Object&gt; entry : rawProps.entrySet()) {</span>
+<span class="nc" id="L390">                    String strValue = (String)entry.getValue();</span>
                     Object value;
-<span class="nc bnc" id="L394" title="All 2 branches missed.">                    if (strValue.equals(&quot;true&quot;)) {</span>
-<span class="nc" id="L395">                        value = Boolean.TRUE;</span>
-<span class="nc bnc" id="L396" title="All 2 branches missed.">                    } else if (strValue.equals(&quot;false&quot;)) {</span>
-<span class="nc" id="L397">                        value = Boolean.FALSE;</span>
+<span class="nc bnc" id="L392" title="All 2 branches missed.">                    if (strValue.equals(&quot;true&quot;)) {</span>
+<span class="nc" id="L393">                        value = Boolean.TRUE;</span>
+<span class="nc bnc" id="L394" title="All 2 branches missed.">                    } else if (strValue.equals(&quot;false&quot;)) {</span>
+<span class="nc" id="L395">                        value = Boolean.FALSE;</span>
                     } else {
                         try {
-<span class="nc" id="L400">                            value = Integer.valueOf(strValue);</span>
-<span class="nc" id="L401">                        } catch (NumberFormatException ex) {</span>
-<span class="nc" id="L402">                            value = strValue;</span>
-<span class="nc" id="L403">                        }</span>
-                    }
-<span class="nc" id="L405">                    props.put(entry.getKey(), value);</span>
-<span class="nc" id="L406">                }</span>
-<span class="nc bnc" id="L407" title="All 2 branches missed.">                if (log.isDebugEnabled()) {</span>
-<span class="nc" id="L408">                    log.debug(&quot;Loaded factory properties from &quot; + name + &quot;: &quot; + props);</span>
-                }
-<span class="nc" id="L410">                return props;</span>
-<span class="nc" id="L411">            } catch (IOException ex) {</span>
-<span class="nc" id="L412">                log.error(&quot;Failed to read &quot; + name, ex);</span>
-<span class="nc" id="L413">                return null;</span>
+<span class="nc" id="L398">                            value = Integer.valueOf(strValue);</span>
+<span class="nc" id="L399">                        } catch (NumberFormatException ex) {</span>
+<span class="nc" id="L400">                            value = strValue;</span>
+<span class="nc" id="L401">                        }</span>
+                    }
+<span class="nc" id="L403">                    props.put((String)entry.getKey(), value);</span>
+<span class="nc" id="L404">                }</span>
+<span class="nc bnc" id="L405" title="All 2 branches missed.">                if (log.isDebugEnabled()) {</span>
+<span class="nc" id="L406">                    log.debug(&quot;Loaded factory properties from &quot; + name + &quot;: &quot; + props);</span>
+                }
+<span class="nc" id="L408">                return props;</span>
+<span class="nc" id="L409">            } catch (IOException ex) {</span>
+<span class="nc" id="L410">                log.error(&quot;Failed to read &quot; + name, ex);</span>
+<span class="nc" id="L411">                return null;</span>
             } finally {
-<span class="nc" id="L415">                try {</span>
-<span class="nc" id="L416">                    in.close();</span>
-<span class="nc" id="L417">                } catch (IOException ex) {</span>
+<span class="nc" id="L413">                try {</span>
+<span class="nc" id="L414">                    in.close();</span>
+<span class="nc" id="L415">                } catch (IOException ex) {</span>
                     // Ignore
-<span class="nc" id="L419">                }</span>
+<span class="nc" id="L417">                }</span>
             }
         }
     }
@@ -424,38 +422,37 @@ import java.util.WeakHashMap;
     private static XMLInputFactory newXMLInputFactory(final ClassLoader classLoader,
             final StAXParserConfiguration configuration) {
         
-<span class="fc" id="L427">        return (XMLInputFactory)AccessController.doPrivileged(new PrivilegedAction() {</span>
-            public Object run() {
+<span class="fc" id="L425">        return AccessController.doPrivileged(new PrivilegedAction&lt;XMLInputFactory&gt;() {</span>
+            public XMLInputFactory run() {
                 ClassLoader savedClassLoader;
-<span class="fc bfc" id="L430" title="All 2 branches covered.">                if (classLoader == null) {</span>
-<span class="fc" id="L431">                    savedClassLoader = null;</span>
+<span class="fc bfc" id="L428" title="All 2 branches covered.">                if (classLoader == null) {</span>
+<span class="fc" id="L429">                    savedClassLoader = null;</span>
                 } else {
-<span class="fc" id="L433">                    savedClassLoader = Thread.currentThread().getContextClassLoader();</span>
-<span class="fc" id="L434">                    Thread.currentThread().setContextClassLoader(classLoader);</span>
+<span class="fc" id="L431">                    savedClassLoader = Thread.currentThread().getContextClassLoader();</span>
+<span class="fc" id="L432">                    Thread.currentThread().setContextClassLoader(classLoader);</span>
                 }
                 try {
-<span class="fc" id="L437">                    XMLInputFactory factory = XMLInputFactory.newInstance();</span>
+<span class="fc" id="L435">                    XMLInputFactory factory = XMLInputFactory.newInstance();</span>
                     // Woodstox 3.x by default creates coalescing parsers. Even if this violates
                     // the StAX specs (see WSTX-140), for compatibility with Woodstox 3.x, we always enable
                     // coalescing mode. Note that we need to do that before loading
                     // XMLInputFactory.properties so that this setting can be overridden.
-<span class="fc" id="L442">                    factory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE);</span>
-<span class="fc" id="L443">                    Map props = loadFactoryProperties(&quot;XMLInputFactory.properties&quot;);</span>
-<span class="pc bpc" id="L444" title="1 of 2 branches missed.">                    if (props != null) {</span>
-<span class="nc bnc" id="L445" title="All 2 branches missed.">                        for (Iterator it = props.entrySet().iterator(); it.hasNext(); ) {</span>
-<span class="nc" id="L446">                            Map.Entry entry = (Map.Entry)it.next();</span>
-<span class="nc" id="L447">                            factory.setProperty((String)entry.getKey(), entry.getValue());</span>
-<span class="nc" id="L448">                        }</span>
-                    }
-<span class="fc" id="L450">                    StAXDialect dialect = StAXDialectDetector.getDialect(factory);</span>
-<span class="pc bpc" id="L451" title="1 of 2 branches missed.">                    if (configuration != null) {</span>
-<span class="fc" id="L452">                        factory = configuration.configure(factory, dialect);</span>
+<span class="fc" id="L440">                    factory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE);</span>
+<span class="fc" id="L441">                    Map&lt;String,Object&gt; props = loadFactoryProperties(&quot;XMLInputFactory.properties&quot;);</span>
+<span class="pc bpc" id="L442" title="1 of 2 branches missed.">                    if (props != null) {</span>
+<span class="nc bnc" id="L443" title="All 2 branches missed.">                        for (Map.Entry&lt;String,Object&gt; entry : props.entrySet()) {</span>
+<span class="nc" id="L444">                            factory.setProperty(entry.getKey(), entry.getValue());</span>
+<span class="nc" id="L445">                        }</span>
+                    }
+<span class="fc" id="L447">                    StAXDialect dialect = StAXDialectDetector.getDialect(factory);</span>
+<span class="pc bpc" id="L448" title="1 of 2 branches missed.">                    if (configuration != null) {</span>
+<span class="fc" id="L449">                        factory = configuration.configure(factory, dialect);</span>
                     }
-<span class="fc" id="L454">                    return new ImmutableXMLInputFactory(dialect.normalize(</span>
+<span class="fc" id="L451">                    return new ImmutableXMLInputFactory(dialect.normalize(</span>
                             dialect.makeThreadSafe(factory)));
                 } finally {
-<span class="pc bpc" id="L457" title="2 of 4 branches missed.">                    if (savedClassLoader != null) {</span>
-<span class="pc" id="L458">                        Thread.currentThread().setContextClassLoader(savedClassLoader);</span>
+<span class="pc bpc" id="L454" title="2 of 4 branches missed.">                    if (savedClassLoader != null) {</span>
+<span class="pc" id="L455">                        Thread.currentThread().setContextClassLoader(savedClassLoader);</span>
                     }
                 }
             }
@@ -467,120 +464,119 @@ import java.util.WeakHashMap;
      */
     private static XMLInputFactory getXMLInputFactory_perClassLoader(StAXParserConfiguration configuration) {
         
-<span class="fc" id="L470">        ClassLoader cl = getContextClassLoader();</span>
+<span class="fc" id="L467">        ClassLoader cl = getContextClassLoader();</span>
         XMLInputFactory factory;
-<span class="pc bpc" id="L472" title="1 of 2 branches missed.">        if (cl == null) {</span>
-<span class="nc" id="L473">            factory = getXMLInputFactory_singleton(configuration);</span>
+<span class="pc bpc" id="L469" title="1 of 2 branches missed.">        if (cl == null) {</span>
+<span class="nc" id="L470">            factory = getXMLInputFactory_singleton(configuration);</span>
         } else {
             // Check the cache
-<span class="fc bfc" id="L476" title="All 2 branches covered.">            if (configuration == null) {</span>
-<span class="fc" id="L477">                configuration = StAXParserConfiguration.DEFAULT;</span>
+<span class="fc bfc" id="L473" title="All 2 branches covered.">            if (configuration == null) {</span>
+<span class="fc" id="L474">                configuration = StAXParserConfiguration.DEFAULT;</span>
             }
-<span class="fc" id="L479">            Map map = (Map)inputFactoryPerCLMap.get(configuration);</span>
-<span class="fc bfc" id="L480" title="All 2 branches covered.">            if (map == null) {</span>
-<span class="fc" id="L481">                map = Collections.synchronizedMap(new WeakHashMap());</span>
-<span class="fc" id="L482">                inputFactoryPerCLMap.put(configuration, map);</span>
-<span class="fc" id="L483">                factory = null;</span>
+<span class="fc" id="L476">            Map&lt;ClassLoader,XMLInputFactory&gt; map = inputFactoryPerCLMap.get(configuration);</span>
+<span class="fc bfc" id="L477" title="All 2 branches covered.">            if (map == null) {</span>
+<span class="fc" id="L478">                map = Collections.synchronizedMap(new WeakHashMap&lt;ClassLoader,XMLInputFactory&gt;());</span>
+<span class="fc" id="L479">                inputFactoryPerCLMap.put(configuration, map);</span>
+<span class="fc" id="L480">                factory = null;</span>
             } else {
-<span class="fc" id="L485">                factory = (XMLInputFactory)map.get(cl);</span>
+<span class="fc" id="L482">                factory = map.get(cl);</span>
             }
             
             // If not found in the cache map, crate a new factory
-<span class="fc bfc" id="L489" title="All 2 branches covered.">            if (factory == null) {</span>
+<span class="fc bfc" id="L486" title="All 2 branches covered.">            if (factory == null) {</span>
 
-<span class="pc bpc" id="L491" title="1 of 2 branches missed.">                if (log.isDebugEnabled()) {</span>
-<span class="nc" id="L492">                    log.debug(&quot;About to create XMLInputFactory implementation with &quot; +</span>
+<span class="pc bpc" id="L488" title="1 of 2 branches missed.">                if (log.isDebugEnabled()) {</span>
+<span class="nc" id="L489">                    log.debug(&quot;About to create XMLInputFactory implementation with &quot; +</span>
                                 &quot;classloader=&quot; + cl);
-<span class="nc" id="L494">                    log.debug(&quot;The classloader for javax.xml.stream.XMLInputFactory is: &quot;</span>
+<span class="nc" id="L491">                    log.debug(&quot;The classloader for javax.xml.stream.XMLInputFactory is: &quot;</span>
                               + XMLInputFactory.class.getClassLoader());
                 }
                 try {
-<span class="fc" id="L498">                    factory = newXMLInputFactory(null, configuration);</span>
-<span class="nc" id="L499">                } catch (ClassCastException cce) {</span>
-<span class="nc bnc" id="L500" title="All 2 branches missed.">                    if (log.isDebugEnabled()) {</span>
-<span class="nc" id="L501">                        log.debug(&quot;Failed creation of XMLInputFactory implementation with &quot; +</span>
+<span class="fc" id="L495">                    factory = newXMLInputFactory(null, configuration);</span>
+<span class="nc" id="L496">                } catch (ClassCastException cce) {</span>
+<span class="nc bnc" id="L497" title="All 2 branches missed.">                    if (log.isDebugEnabled()) {</span>
+<span class="nc" id="L498">                        log.debug(&quot;Failed creation of XMLInputFactory implementation with &quot; +</span>
                                         &quot;classloader=&quot; + cl);
-<span class="nc" id="L503">                        log.debug(&quot;Exception is=&quot; + cce);</span>
-<span class="nc" id="L504">                        log.debug(&quot;Attempting with classloader: &quot; + </span>
+<span class="nc" id="L500">                        log.debug(&quot;Exception is=&quot; + cce);</span>
+<span class="nc" id="L501">                        log.debug(&quot;Attempting with classloader: &quot; + </span>
                                   XMLInputFactory.class.getClassLoader());
                     }
-<span class="nc" id="L507">                    factory = newXMLInputFactory(XMLInputFactory.class.getClassLoader(),</span>
+<span class="nc" id="L504">                    factory = newXMLInputFactory(XMLInputFactory.class.getClassLoader(),</span>
                             configuration);
-<span class="fc" id="L509">                }</span>
+<span class="fc" id="L506">                }</span>
                     
-<span class="pc bpc" id="L511" title="1 of 2 branches missed.">                if (factory != null) {</span>
+<span class="pc bpc" id="L508" title="1 of 2 branches missed.">                if (factory != null) {</span>
                     // Cache the new factory
-<span class="fc" id="L513">                    map.put(cl, factory);</span>
+<span class="fc" id="L510">                    map.put(cl, factory);</span>
                     
-<span class="pc bpc" id="L515" title="1 of 2 branches missed.">                    if (log.isDebugEnabled()) {</span>
-<span class="nc" id="L516">                        log.debug(&quot;Created XMLInputFactory = &quot; + factory.getClass() + </span>
+<span class="pc bpc" id="L512" title="1 of 2 branches missed.">                    if (log.isDebugEnabled()) {</span>
+<span class="nc" id="L513">                        log.debug(&quot;Created XMLInputFactory = &quot; + factory.getClass() + </span>
                                   &quot; with classloader=&quot; + cl);
-<span class="nc" id="L518">                        log.debug(&quot;Configuration = &quot; + configuration);</span>
-<span class="nc" id="L519">                        log.debug(&quot;Size of XMLInputFactory map for this configuration = &quot; + map.size());</span>
-<span class="nc" id="L520">                        log.debug(&quot;Configurations for which factories have been cached = &quot; +</span>
+<span class="nc" id="L515">                        log.debug(&quot;Configuration = &quot; + configuration);</span>
+<span class="nc" id="L516">                        log.debug(&quot;Size of XMLInputFactory map for this configuration = &quot; + map.size());</span>
+<span class="nc" id="L517">                        log.debug(&quot;Configurations for which factories have been cached = &quot; +</span>
                                 inputFactoryPerCLMap.keySet());
                     }
                 } else {
-<span class="nc" id="L524">                    factory = getXMLInputFactory_singleton(configuration);</span>
+<span class="nc" id="L521">                    factory = getXMLInputFactory_singleton(configuration);</span>
                 }
             }
             
         }
-<span class="fc" id="L529">        return factory;</span>
+<span class="fc" id="L526">        return factory;</span>
     }
     
     /**
      * @return singleton XMLInputFactory loaded with the StAXUtils classloader
      */
     private static XMLInputFactory getXMLInputFactory_singleton(StAXParserConfiguration configuration) {
-<span class="pc bpc" id="L536" title="1 of 2 branches missed.">        if (configuration == null) {</span>
-<span class="nc" id="L537">            configuration = StAXParserConfiguration.DEFAULT;</span>
+<span class="pc bpc" id="L533" title="1 of 2 branches missed.">        if (configuration == null) {</span>
+<span class="nc" id="L534">            configuration = StAXParserConfiguration.DEFAULT;</span>
         }
-<span class="fc" id="L539">        XMLInputFactory f = (XMLInputFactory)inputFactoryMap.get(configuration);</span>
-<span class="fc bfc" id="L540" title="All 2 branches covered.">        if (f == null) {</span>
-<span class="fc" id="L541">            f = newXMLInputFactory(StAXUtils.class.getClassLoader(), configuration);</span>
-<span class="fc" id="L542">            inputFactoryMap.put(configuration, f);</span>
-<span class="fc bfc" id="L543" title="All 2 branches covered.">            if (log.isDebugEnabled()) {</span>
-<span class="pc bpc" id="L544" title="1 of 2 branches missed.">                if (f != null) {</span>
-<span class="fc" id="L545">                    log.debug(&quot;Created singleton XMLInputFactory &quot; + f.getClass() + &quot; with configuration &quot; + configuration);</span>
+<span class="fc" id="L536">        XMLInputFactory f = inputFactoryMap.get(configuration);</span>
+<span class="fc bfc" id="L537" title="All 2 branches covered.">        if (f == null) {</span>
+<span class="fc" id="L538">            f = newXMLInputFactory(StAXUtils.class.getClassLoader(), configuration);</span>
+<span class="fc" id="L539">            inputFactoryMap.put(configuration, f);</span>
+<span class="fc bfc" id="L540" title="All 2 branches covered.">            if (log.isDebugEnabled()) {</span>
+<span class="pc bpc" id="L541" title="1 of 2 branches missed.">                if (f != null) {</span>
+<span class="fc" id="L542">                    log.debug(&quot;Created singleton XMLInputFactory &quot; + f.getClass() + &quot; with configuration &quot; + configuration);</span>
                 }
             }
         }
         
-<span class="fc" id="L550">        return f;</span>
+<span class="fc" id="L547">        return f;</span>
     }
     
     private static XMLOutputFactory newXMLOutputFactory(final ClassLoader classLoader,
             final StAXWriterConfiguration configuration) {
-<span class="fc" id="L555">        return (XMLOutputFactory)AccessController.doPrivileged(new PrivilegedAction() {</span>
-            public Object run() {
+<span class="fc" id="L552">        return AccessController.doPrivileged(new PrivilegedAction&lt;XMLOutputFactory&gt;() {</span>
+            public XMLOutputFactory run() {
                 ClassLoader savedClassLoader;
-<span class="fc bfc" id="L558" title="All 2 branches covered.">                if (classLoader == null) {</span>
-<span class="fc" id="L559">                    savedClassLoader = null;</span>
+<span class="fc bfc" id="L555" title="All 2 branches covered.">                if (classLoader == null) {</span>
+<span class="fc" id="L556">                    savedClassLoader = null;</span>
                 } else {
-<span class="fc" id="L561">                    savedClassLoader = Thread.currentThread().getContextClassLoader();</span>
-<span class="fc" id="L562">                    Thread.currentThread().setContextClassLoader(classLoader);</span>
+<span class="fc" id="L558">                    savedClassLoader = Thread.currentThread().getContextClassLoader();</span>
+<span class="fc" id="L559">                    Thread.currentThread().setContextClassLoader(classLoader);</span>
                 }
                 try {
-<span class="fc" id="L565">                    XMLOutputFactory factory = XMLOutputFactory.newInstance();</span>
-<span class="fc" id="L566">                    factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, </span>
+<span class="fc" id="L562">                    XMLOutputFactory factory = XMLOutputFactory.newInstance();</span>
+<span class="fc" id="L563">                    factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, </span>
                                         Boolean.FALSE);
-<span class="fc" id="L568">                    Map props = loadFactoryProperties(&quot;XMLOutputFactory.properties&quot;);</span>
-<span class="pc bpc" id="L569" title="1 of 2 branches missed.">                    if (props != null) {</span>
-<span class="nc bnc" id="L570" title="All 2 branches missed.">                        for (Iterator it = props.entrySet().iterator(); it.hasNext(); ) {</span>
-<span class="nc" id="L571">                            Map.Entry entry = (Map.Entry)it.next();</span>
-<span class="nc" id="L572">                            factory.setProperty((String)entry.getKey(), entry.getValue());</span>
-<span class="nc" id="L573">                        }</span>
-                    }
-<span class="fc" id="L575">                    StAXDialect dialect = StAXDialectDetector.getDialect(factory);</span>
-<span class="pc bpc" id="L576" title="1 of 2 branches missed.">                    if (configuration != null) {</span>
-<span class="fc" id="L577">                        factory = configuration.configure(factory, dialect);</span>
+<span class="fc" id="L565">                    Map&lt;String,Object&gt; props = loadFactoryProperties(&quot;XMLOutputFactory.properties&quot;);</span>
+<span class="pc bpc" id="L566" title="1 of 2 branches missed.">                    if (props != null) {</span>
+<span class="nc bnc" id="L567" title="All 2 branches missed.">                        for (Map.Entry&lt;String,Object&gt; entry : props.entrySet()) {</span>
+<span class="nc" id="L568">                            factory.setProperty(entry.getKey(), entry.getValue());</span>
+<span class="nc" id="L569">                        }</span>
+                    }
+<span class="fc" id="L571">                    StAXDialect dialect = StAXDialectDetector.getDialect(factory);</span>
+<span class="pc bpc" id="L572" title="1 of 2 branches missed.">                    if (configuration != null) {</span>
+<span class="fc" id="L573">                        factory = configuration.configure(factory, dialect);</span>
                     }
-<span class="fc" id="L579">                    return new ImmutableXMLOutputFactory(dialect.normalize(</span>
+<span class="fc" id="L575">                    return new ImmutableXMLOutputFactory(dialect.normalize(</span>
                             dialect.makeThreadSafe(factory)));
                 } finally {
-<span class="pc bpc" id="L582" title="2 of 4 branches missed.">                    if (savedClassLoader != null) {</span>
-<span class="pc" id="L583">                        Thread.currentThread().setContextClassLoader(savedClassLoader);</span>
+<span class="pc bpc" id="L578" title="2 of 4 branches missed.">                    if (savedClassLoader != null) {</span>
+<span class="pc" id="L579">                        Thread.currentThread().setContextClassLoader(savedClassLoader);</span>
                     }
                 }
             }
@@ -591,94 +587,94 @@ import java.util.WeakHashMap;
      * @return XMLOutputFactory for the current classloader
      */
     private static XMLOutputFactory getXMLOutputFactory_perClassLoader(StAXWriterConfiguration configuration) {
-<span class="fc" id="L594">        ClassLoader cl = getContextClassLoader();</span>
+<span class="fc" id="L590">        ClassLoader cl = getContextClassLoader();</span>
         XMLOutputFactory factory;
-<span class="pc bpc" id="L596" title="1 of 2 branches missed.">        if (cl == null) {</span>
-<span class="nc" id="L597">            factory = getXMLOutputFactory_singleton(configuration);</span>
+<span class="pc bpc" id="L592" title="1 of 2 branches missed.">        if (cl == null) {</span>
+<span class="nc" id="L593">            factory = getXMLOutputFactory_singleton(configuration);</span>
         } else {
-<span class="fc bfc" id="L599" title="All 2 branches covered.">            if (configuration == null) {</span>
-<span class="fc" id="L600">                configuration = StAXWriterConfiguration.DEFAULT;</span>
+<span class="fc bfc" id="L595" title="All 2 branches covered.">            if (configuration == null) {</span>
+<span class="fc" id="L596">                configuration = StAXWriterConfiguration.DEFAULT;</span>
             }
-<span class="fc" id="L602">            Map map = (Map)outputFactoryPerCLMap.get(configuration);</span>
-<span class="fc bfc" id="L603" title="All 2 branches covered.">            if (map == null) {</span>
-<span class="fc" id="L604">                map = Collections.synchronizedMap(new WeakHashMap());</span>
-<span class="fc" id="L605">                outputFactoryPerCLMap.put(configuration, map);</span>
-<span class="fc" id="L606">                factory = null;</span>
+<span class="fc" id="L598">            Map&lt;ClassLoader,XMLOutputFactory&gt; map = outputFactoryPerCLMap.get(configuration);</span>
+<span class="fc bfc" id="L599" title="All 2 branches covered.">            if (map == null) {</span>
+<span class="fc" id="L600">                map = Collections.synchronizedMap(new WeakHashMap&lt;ClassLoader,XMLOutputFactory&gt;());</span>
+<span class="fc" id="L601">                outputFactoryPerCLMap.put(configuration, map);</span>
+<span class="fc" id="L602">                factory = null;</span>
             } else {
-<span class="fc" id="L608">                factory = (XMLOutputFactory)map.get(cl);</span>
+<span class="fc" id="L604">                factory = map.get(cl);</span>
             }
             
-<span class="fc bfc" id="L611" title="All 2 branches covered.">            if (factory == null) {</span>
-<span class="pc bpc" id="L612" title="1 of 2 branches missed.">                if (log.isDebugEnabled()) {</span>
-<span class="nc" id="L613">                    log.debug(&quot;About to create XMLOutputFactory implementation with &quot; +</span>
+<span class="fc bfc" id="L607" title="All 2 branches covered.">            if (factory == null) {</span>
+<span class="pc bpc" id="L608" title="1 of 2 branches missed.">                if (log.isDebugEnabled()) {</span>
+<span class="nc" id="L609">                    log.debug(&quot;About to create XMLOutputFactory implementation with &quot; +</span>
                                 &quot;classloader=&quot; + cl);
-<span class="nc" id="L615">                    log.debug(&quot;The classloader for javax.xml.stream.XMLOutputFactory is: &quot; + </span>
+<span class="nc" id="L611">                    log.debug(&quot;The classloader for javax.xml.stream.XMLOutputFactory is: &quot; + </span>
                               XMLOutputFactory.class.getClassLoader());
                 }
                 try {
-<span class="fc" id="L619">                    factory = newXMLOutputFactory(null, configuration);</span>
-<span class="nc" id="L620">                } catch (ClassCastException cce) {</span>
-<span class="nc bnc" id="L621" title="All 2 branches missed.">                    if (log.isDebugEnabled()) {</span>
-<span class="nc" id="L622">                        log.debug(&quot;Failed creation of XMLOutputFactory implementation with &quot; +</span>
+<span class="fc" id="L615">                    factory = newXMLOutputFactory(null, configuration);</span>
+<span class="nc" id="L616">                } catch (ClassCastException cce) {</span>
+<span class="nc bnc" id="L617" title="All 2 branches missed.">                    if (log.isDebugEnabled()) {</span>
+<span class="nc" id="L618">                        log.debug(&quot;Failed creation of XMLOutputFactory implementation with &quot; +</span>
                                         &quot;classloader=&quot; + cl);
-<span class="nc" id="L624">                        log.debug(&quot;Exception is=&quot; + cce);</span>
-<span class="nc" id="L625">                        log.debug(&quot;Attempting with classloader: &quot; + </span>
+<span class="nc" id="L620">                        log.debug(&quot;Exception is=&quot; + cce);</span>
+<span class="nc" id="L621">                        log.debug(&quot;Attempting with classloader: &quot; + </span>
                                   XMLOutputFactory.class.getClassLoader());
                     }
-<span class="nc" id="L628">                    factory = newXMLOutputFactory(XMLOutputFactory.class.getClassLoader(),</span>
+<span class="nc" id="L624">                    factory = newXMLOutputFactory(XMLOutputFactory.class.getClassLoader(),</span>
                             configuration);
-<span class="fc" id="L630">                }</span>
-<span class="pc bpc" id="L631" title="1 of 2 branches missed.">                if (factory != null) {</span>
-<span class="fc" id="L632">                    map.put(cl, factory);</span>
-<span class="pc bpc" id="L633" title="1 of 2 branches missed.">                    if (log.isDebugEnabled()) {</span>
-<span class="nc" id="L634">                        log.debug(&quot;Created XMLOutputFactory = &quot; + factory.getClass() </span>
+<span class="fc" id="L626">                }</span>
+<span class="pc bpc" id="L627" title="1 of 2 branches missed.">                if (factory != null) {</span>
+<span class="fc" id="L628">                    map.put(cl, factory);</span>
+<span class="pc bpc" id="L629" title="1 of 2 branches missed.">                    if (log.isDebugEnabled()) {</span>
+<span class="nc" id="L630">                        log.debug(&quot;Created XMLOutputFactory = &quot; + factory.getClass() </span>
                                   + &quot; for classloader=&quot; + cl);
-<span class="nc" id="L636">                        log.debug(&quot;Configuration = &quot; + configuration);</span>
-<span class="nc" id="L637">                        log.debug(&quot;Size of XMLOutFactory map for this configuration = &quot; + map.size());</span>
-<span class="nc" id="L638">                        log.debug(&quot;Configurations for which factories have been cached = &quot; +</span>
+<span class="nc" id="L632">                        log.debug(&quot;Configuration = &quot; + configuration);</span>
+<span class="nc" id="L633">                        log.debug(&quot;Size of XMLOutFactory map for this configuration = &quot; + map.size());</span>
+<span class="nc" id="L634">                        log.debug(&quot;Configurations for which factories have been cached = &quot; +</span>
                                 outputFactoryPerCLMap.keySet());
                     }
                 } else {
-<span class="nc" id="L642">                    factory = getXMLOutputFactory_singleton(configuration);</span>
+<span class="nc" id="L638">                    factory = getXMLOutputFactory_singleton(configuration);</span>
                 }
             }
             
         }
-<span class="fc" id="L647">        return factory;</span>
+<span class="fc" id="L643">        return factory;</span>
     }
     
     /**
      * @return XMLOutputFactory singleton loaded with the StAXUtils classloader
      */
     private static XMLOutputFactory getXMLOutputFactory_singleton(StAXWriterConfiguration configuration) {
-<span class="pc bpc" id="L654" title="1 of 2 branches missed.">        if (configuration == null) {</span>
-<span class="nc" id="L655">            configuration = StAXWriterConfiguration.DEFAULT;</span>
+<span class="pc bpc" id="L650" title="1 of 2 branches missed.">        if (configuration == null) {</span>
+<span class="nc" id="L651">            configuration = StAXWriterConfiguration.DEFAULT;</span>
         }
-<span class="fc" id="L657">        XMLOutputFactory f = (XMLOutputFactory)outputFactoryMap.get(configuration);</span>
-<span class="pc bpc" id="L658" title="1 of 2 branches missed.">        if (f == null) {</span>
-<span class="fc" id="L659">            f = newXMLOutputFactory(StAXUtils.class.getClassLoader(), configuration);</span>
-<span class="fc" id="L660">            outputFactoryMap.put(configuration, f);</span>
-<span class="pc bpc" id="L661" title="1 of 2 branches missed.">            if (log.isDebugEnabled()) {</span>
-<span class="pc bpc" id="L662" title="1 of 2 branches missed.">                if (f != null) {</span>
-<span class="fc" id="L663">                    log.debug(&quot;Created singleton XMLOutputFactory &quot; + f.getClass() + &quot; with configuration &quot; + configuration);</span>
+<span class="fc" id="L653">        XMLOutputFactory f = outputFactoryMap.get(configuration);</span>
+<span class="pc bpc" id="L654" title="1 of 2 branches missed.">        if (f == null) {</span>
+<span class="fc" id="L655">            f = newXMLOutputFactory(StAXUtils.class.getClassLoader(), configuration);</span>
+<span class="fc" id="L656">            outputFactoryMap.put(configuration, f);</span>
+<span class="pc bpc" id="L657" title="1 of 2 branches missed.">            if (log.isDebugEnabled()) {</span>
+<span class="pc bpc" id="L658" title="1 of 2 branches missed.">                if (f != null) {</span>
+<span class="fc" id="L659">                    log.debug(&quot;Created singleton XMLOutputFactory &quot; + f.getClass() + &quot; with configuration &quot; + configuration);</span>
                 }
             }
         }
-<span class="fc" id="L667">        return f;</span>
+<span class="fc" id="L663">        return f;</span>
     }
     
     /**
      * @return Trhead Context ClassLoader
      */
     private static ClassLoader getContextClassLoader() {
-<span class="pc bpc" id="L674" title="1 of 2 branches missed.">        if (System.getSecurityManager() == null) {</span>
+<span class="fc bfc" id="L670" title="All 2 branches covered.">        if (System.getSecurityManager() == null) {</span>
             // If there is no security manager, avoid the overhead of the doPrivileged call.
-<span class="fc" id="L676">            return Thread.currentThread().getContextClassLoader();</span>
+<span class="fc" id="L672">            return Thread.currentThread().getContextClassLoader();</span>
         } else {
-<span class="nc" id="L678">            return (ClassLoader)AccessController.doPrivileged(</span>
-<span class="nc" id="L679">                    new PrivilegedAction() {</span>
-                        public Object run()  {
-<span class="nc" id="L681">                            return Thread.currentThread().getContextClassLoader();</span>
+<span class="fc" id="L674">            return AccessController.doPrivileged(</span>
+<span class="fc" id="L675">                    new PrivilegedAction&lt;ClassLoader&gt;() {</span>
+                        public ClassLoader run()  {
+<span class="fc" id="L677">                            return Thread.currentThread().getContextClassLoader();</span>
                         }
                     }
             );
@@ -692,7 +688,7 @@ import java.util.WeakHashMap;
     public static XMLStreamReader createNetworkDetachedXMLStreamReader(InputStream in, String encoding)
             throws XMLStreamException {
         
-<span class="nc" id="L695">        return createXMLStreamReader(StAXParserConfiguration.STANDALONE, in, encoding);</span>
+<span class="nc" id="L691">        return createXMLStreamReader(StAXParserConfiguration.STANDALONE, in, encoding);</span>
     }
 
     /**
@@ -700,7 +696,7 @@ import java.util.WeakHashMap;
      *             {@link StAXParserConfiguration#STANDALONE}
      */
     public static XMLInputFactory getNetworkDetachedXMLInputFactory() {
-<span class="nc" id="L703">        return getXMLInputFactory(StAXParserConfiguration.STANDALONE);</span>
+<span class="nc" id="L699">        return getXMLInputFactory(StAXParserConfiguration.STANDALONE);</span>
     }
     
     /**
@@ -710,7 +706,7 @@ import java.util.WeakHashMap;
     public static XMLStreamReader createNetworkDetachedXMLStreamReader(InputStream in)
             throws XMLStreamException {
         
-<span class="nc" id="L713">        return createXMLStreamReader(StAXParserConfiguration.STANDALONE, in);</span>
+<span class="nc" id="L709">        return createXMLStreamReader(StAXParserConfiguration.STANDALONE, in);</span>
     }
 
     /**
@@ -720,14 +716,14 @@ import java.util.WeakHashMap;
     public static XMLStreamReader createNetworkDetachedXMLStreamReader(Reader in)
             throws XMLStreamException {
         
-<span class="nc" id="L723">        return createXMLStreamReader(StAXParserConfiguration.STANDALONE, in);</span>
+<span class="nc" id="L719">        return createXMLStreamReader(StAXParserConfiguration.STANDALONE, in);</span>
     }
 
     /**
      * @deprecated Use {@link XMLEventUtils#getEventTypeString(int)} instead
      */
     public static String getEventTypeString(int event) {
-<span class="nc" id="L730">        return XMLEventUtils.getEventTypeString(event);</span>
+<span class="nc" id="L726">        return XMLEventUtils.getEventTypeString(event);</span>
     }
 }
 </pre><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.5.201505241946</span></div></body></html>
\ No newline at end of file