Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8027484

Implementation error in SAX2DOM.java

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 6u32, 7, 8
    • xml

      In the following code snippet, line 313 doesn't have braces so line 315 isn't in the block even though the indentation suggests that it might be. This will cause the factory being created twice when the implementation is the default. Mechanism is misspelled too.

          311 289 joehw private Document createDocument(boolean useServicesMachnism) throws ParserConfigurationException {
          312 289 joehw if (_factory == null) {
          313 289 joehw if (useServicesMachnism)
          314 289 joehw _factory = DocumentBuilderFactory.newInstance();
          315 289 joehw if (!(_factory instanceof com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl)) {
          316 289 joehw _internal = false;
          317 289 joehw }
          318 289 joehw else
          319 289 joehw _factory = DocumentBuilderFactory.newInstance(
          320 289 joehw "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl",
          321 289 joehw SAX2DOM.class.getClassLoader()
          322 289 joehw );
          323 289 joehw }

            joehw Joe Wang
            joehw Joe Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: