Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.3, 1.4
-
None
-
Patch
Description
I use blame command for Mercurial provider (HG) and there is this exception :
Caused by: org.codehaus.plexus.util.cli.CommandLineException: Error inside systemOut parser at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:222) at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:107) at org.apache.maven.scm.provider.hg.HgUtils.executeCmd(HgUtils.java:159) ... 13 more Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1768) at org.apache.maven.scm.provider.hg.command.blame.HgBlameConsumer.doConsume(HgBlameConsumer.java:49) at org.apache.maven.scm.provider.hg.command.HgConsumer.consumeLine(HgConsumer.java:131) at org.codehaus.plexus.util.cli.StreamPumper.consumeLine(StreamPumper.java:197) at org.codehaus.plexus.util.cli.StreamPumper.run(StreamPumper.java:137)
This exception seems to launch when a line is empty in source file.
On version 1.3, blame is partial and no exception is launched.
I propose a patch to fix this problem.