Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.0.9, 2.0.10
-
None
-
None
-
Java version: 1.5.0_16
OS name: "linux" version: "2.6.26-1-686" arch: "i386" Family: "unix"
Description
When i run the following command i get a StringIndexOutOfBoundsException:
mvn -Darguments=" "
Note the space: 'arguments' equal double-quote space double-quote
Here is the stacktrace (with maven 2.0.10 svn r736029):
---------------------------------------------------
constituent[0]: file:/home/ricardvi/Application/maven/lib/maven-2.0.10-uber.jar
---------------------------------------------------
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:146)
at java.lang.StringBuffer.setLength(StringBuffer.java:154)
at org.apache.maven.cli.MavenCli$CLIManager.cleanArgs(MavenCli.java:842)
at org.apache.maven.cli.MavenCli$CLIManager.parse(MavenCli.java:795)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
I'm not sure if it's a bug in cleanArgs method or a bug in the classworlds project... so i report this here.
Attachments
Issue Links
- duplicates
-
MNG-3529 mvn -Da=" " throws an excepltion
- Closed