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

Method setExpandEntityReferences of Object DocumentBuilderFactory has no effects

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 1.4.1
    • Fix Version/s: None
    • Component/s: xml
    • Labels:

      Description



      Name: gm110360 Date: 10/14/2002


      FULL PRODUCT VERSION :
      java version "1.4.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
      Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      DocumentBuilderFactory dbf =
      DocumentBuilderFactory.newInstance();
      dbf.setExpandEntityReferences( false );
      DocumentBuilder db = dbf.newDocumentBuilder ();
      Document myXmlDoc = db.parse( new File( xmlFile ) );

      => the external entities are always expanded

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. create an xml file with an external entity
      2. write the program as described above
      3. run the program

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      I implement a subclass of DocumentHandler to report the
      external entities => they are always expanded and the
      parser is reading the content of the external entities.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      see desciption
      ---------- END SOURCE ----------

      CUSTOMER WORKAROUND :
      would be nice to have a workaround
      (Review ID: 164783)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                duke J. Duke (Inactive)
                Reporter:
                gmanwanisunw Girish Manwani (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: