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

Method setExpandEntityReferences of Object DocumentBuilderFactory has no effects

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.4.1
    • xml



      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)
      ======================================================================

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: