You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andreas Gudian (JIRA)" <ji...@codehaus.org> on 2013/04/06 12:39:52 UTC
[jira] (MSHARED-282) StringIndexOutOfBoundsException in m-s-u
XMLEncode if carriage-return is the last character
Andreas Gudian created MSHARED-282:
--------------------------------------
Summary: StringIndexOutOfBoundsException in m-s-u XMLEncode if carriage-return is the last character
Key: MSHARED-282
URL: https://jira.codehaus.org/browse/MSHARED-282
Project: Maven Shared Components
Issue Type: Bug
Components: maven-shared-utils
Affects Versions: maven-shared-utils-0.3
Reporter: Andreas Gudian
Reported with SUREFIRE-981
When adding an attribute that ends with '\r', we get the following exception:
{code}
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 38
at java.lang.String.charAt(String.java:686)
at org.apache.maven.surefire.shade.org.apache.maven.shared.utils.xml.XMLEncode.xmlEncodeTextAsPCDATA(XMLEncode.java:166)
at org.apache.maven.surefire.shade.org.apache.maven.shared.utils.xml.XMLEncode.xmlEncodeTextForAttribute(XMLEncode.java:59)
at org.apache.maven.surefire.shade.org.apache.maven.shared.utils.xml.PrettyPrintXMLWriter.addAttribute(PrettyPrintXMLWriter.java:159)
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira