Commons Digester
  1. Commons Digester
  2. DIGESTER-52

<!ENTITY directives not processed properly in Windows.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Nightly Builds
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: PC

      Description

      Try including an xml fragment using the <!ENTITY directive . On Windows you'll
      get a very uninformative exception.

      The reason is:
      org.apache.commons.digester.Digester.parse(File) incorrectly constructs file://
      URLs. On Windows, the file located at c:\foo.txt should be referred to as
      file:///c:/foo.txt NOT file://c:/foo.txt
      The best way to fix this is to change the line
      input.setSystemId("file://" + file.getAbsolutePath());
      to
      input.setSystemId(file.toURL().toString());

        Activity

        John Taylor created issue -
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 28739 12341429
        Henri Yandell made changes -
        Component/s Digester [ 12311111 ]
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Affects Version/s 1.0 Alpha [ 12311665 ]
        Project Commons [ 12310458 ] Commons Digester [ 12310471 ]
        Key COM-1277 DIGESTER-52
        Henri Yandell made changes -
        Affects Version/s 1.0 Alpha [ 12311807 ]
        Henri Yandell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            John Taylor
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development