8016133: Regression: diff. behavior with user-defined SAXParser
authorjoehw
Mon, 17 Jun 2013 12:47:02 -0700
changeset 18358 6a0e9fd8f727
parent 18357 9f4f4ae77766
child 18367 f70f77888ae0
8016133: Regression: diff. behavior with user-defined SAXParser Reviewed-by: chegar, dfuchs
jaxp/src/org/xml/sax/helpers/XMLReaderFactory.java
--- a/jaxp/src/org/xml/sax/helpers/XMLReaderFactory.java	Sun Jun 16 22:32:56 2013 -0700
+++ b/jaxp/src/org/xml/sax/helpers/XMLReaderFactory.java	Mon Jun 17 12:47:02 2013 -0700
@@ -85,6 +85,7 @@
     private static final String property = "org.xml.sax.driver";
     private static SecuritySupport ss = new SecuritySupport();
 
+    private static String _clsFromJar = null;
     private static boolean _jarread = false;
     /**
      * Attempt to create an XMLReader from system defaults.
@@ -163,14 +164,14 @@
                     }
 
                     if (in != null) {
-                        reader = new BufferedReader (
-                                new InputStreamReader (in, "UTF8"));
-                        className = reader.readLine ();
+                        reader = new BufferedReader (new InputStreamReader (in, "UTF8"));
+                        _clsFromJar = reader.readLine ();
                         in.close ();
                     }
                 } catch (Exception e) {
                 }
             }
+            className = _clsFromJar;
         }
 
         // 3. Distro-specific fallback