Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6577

pom.xml: Uncaught IllegalArgumentException when parsing unicode entity ref

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5.4, 3.6.0
    • Fix Version/s: 3.6.1
    • Component/s: POM
    • Labels:
      None

      Description

      Sample Maven pom.xml below:

      <project name="&#xFFFFFF;"></project>

      0xFFFFFF is not a valid Unicode codepoint. This leads to the following uncaught exception arising from plexus:

      Caused by: java.lang.IllegalArgumentException at org.codehaus.plexus.util.xml.pull.MXParser.toChars (MXParser.java:4023) at org.codehaus.plexus.util.xml.pull.MXParser.parseEntityRef (MXParser.java:2727) at org.codehaus.plexus.util.xml.pull.MXParser.parseAttribute (MXParser.java:2522) at org.codehaus.plexus.util.xml.pull.MXParser.parseStartTag (MXParser.java:2218) at org.codehaus.plexus.util.xml.pull.MXParser.parseProlog (MXParser.java:1801) at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl (MXParser.java:1698) at org.codehaus.plexus.util.xml.pull.MXParser.next (MXParser.java:1317) at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.read (MavenXpp3ReaderEx.java:4417) at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.read (MavenXpp3ReaderEx.java:598) at org.apache.maven.model.io.DefaultModelReader.read (DefaultModelReader.java:105) at org.apache.maven.model.io.DefaultModelReader.read (DefaultModelReader.java:82)
      ...

      I'm guessing the expected behavior is to throw an XMLPullParserException instead, to signal an unparsable entity.

      Found using JQF.

        Attachments

          Activity

            People

            • Assignee:
              khmarbaise Karl Heinz Marbaise
              Reporter:
              rohanpadhye Rohan Padhye
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: