You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2002/11/05 21:53:50 UTC
DO NOT REPLY [Bug 14274] New: -
projecthelp throws a java.lang.StringIndexOutOfBoundsException
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14274>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14274
projecthelp throws a java.lang.StringIndexOutOfBoundsException
Summary: projecthelp throws a
java.lang.StringIndexOutOfBoundsException
Product: Ant
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Minor
Priority: Other
Component: Core
AssignedTo: ant-dev@jakarta.apache.org
ReportedBy: dominickmancine@hotmail.com
This only applies to targets that include descriptions (so they are reported in
the projecthelp report). When the longest target name is 16 characters long,
and there is a target name of length 1, a
java.lang.StringIndexOutOfBoundsException is generated. Here is the stack
trace:
at java.lang.String.substring(String.java:1473)
at org.apache.tools.ant.Main.printTargets(Main.java:934)
at org.apache.tools.ant.Main.printTargets(Main.java:862)
at org.apache.tools.ant.Main.runBuild(Main.java:601)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
It occurs because a string of spaces is created that's the length of the
longest target name, but an additional space is needed to pad names of length
1. Thus, the substring call fails.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>