PR: MPJAVADOC-61
StringIndexOutOfBoundsException on parsing the files git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@355937 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a93e8c33ca
commit
47705d54f9
@ -265,6 +265,19 @@ public class JavadocWarningsTextToXml
|
|||||||
int msgStart = warningStart + PADDING;
|
int msgStart = warningStart + PADDING;
|
||||||
String msg = line.substring( msgStart );
|
String msg = line.substring( msgStart );
|
||||||
|
|
||||||
|
Integer lineNumberInt;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lineNumberInt = new Integer( lineNumber );
|
||||||
|
}
|
||||||
|
catch ( NumberFormatException nfe )
|
||||||
|
{
|
||||||
|
// Warnings from package.html files don't contain line numbers
|
||||||
|
fileName = fileNameAndLineNumber.substring( 0, lastColon );
|
||||||
|
System.err.println( "*** WARNING: no line number found in '" + fileName + "', setting to 0." );
|
||||||
|
lineNumberInt = new Integer( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
// Get the messages for the file
|
// Get the messages for the file
|
||||||
Map fileMessages = (Map) files.get( fileName );
|
Map fileMessages = (Map) files.get( fileName );
|
||||||
|
|
||||||
@ -275,13 +288,13 @@ public class JavadocWarningsTextToXml
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the messages for the line
|
// Get the messages for the line
|
||||||
Set lineMessages = (Set) fileMessages.get( new Integer( lineNumber ) );
|
Set lineMessages = (Set) fileMessages.get( lineNumberInt );
|
||||||
|
|
||||||
if ( lineMessages == null )
|
if ( lineMessages == null )
|
||||||
{
|
{
|
||||||
lineMessages = SetUtils.orderedSet( new TreeSet() );
|
lineMessages = SetUtils.orderedSet( new TreeSet() );
|
||||||
|
|
||||||
fileMessages.put( new Integer( lineNumber ), lineMessages );
|
fileMessages.put( lineNumberInt, lineMessages );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Put the message into the line messages set
|
// Put the message into the line messages set
|
||||||
|
|||||||
@ -27,6 +27,7 @@
|
|||||||
</properties>
|
</properties>
|
||||||
<body>
|
<body>
|
||||||
<release version="1.8-SNAPSHOT" date="In SVN">
|
<release version="1.8-SNAPSHOT" date="In SVN">
|
||||||
|
<action dev="ltheussl" type="fix" issue="MPJAVADOC-61">StringIndexOutOfBoundsException on parsing the files.</action>
|
||||||
<action dev="aheritier" type="fix" issue="MPJAVADOC-59">Files package.html and overview.html are not copied when source modifications are used.</action>
|
<action dev="aheritier" type="fix" issue="MPJAVADOC-59">Files package.html and overview.html are not copied when source modifications are used.</action>
|
||||||
<action dev="carlos" type="add" issue="MPJAVADOC-58">Added maven.javadoc.failonerror property.</action>
|
<action dev="carlos" type="add" issue="MPJAVADOC-58">Added maven.javadoc.failonerror property.</action>
|
||||||
<action dev="aheritier" type="add" issue="MPJAVADOC-54" due-to="Dag Sverre Seljebotn">Added maven.javadoc.header and maven.javadoc.footer properties.</action>
|
<action dev="aheritier" type="add" issue="MPJAVADOC-54" due-to="Dag Sverre Seljebotn">Added maven.javadoc.header and maven.javadoc.footer properties.</action>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user