[ http://jira.codehaus.org/browse/MRELEASE-92?page=comments#action_63537 ] 

Daun DeFrance commented on MRELEASE-92:
---------------------------------------

I'm not sure how I could have gotten into the situation where I was getting an 
substring index error: -1.  When I applied the patch, the release plugin 
performed flawlessly.  Without it, I was unable to complete a perform.  I have 
checked my env vars in the past for phantom carriage returns.  I am working off 
a windows XP machine (unfortunately) and it's been an issue in the past.  
Regardless, if the idx is -1, calling substring with it will result in an 
error.  Bring defensive is not so wrong, even if my env is atypical.  

Best.

> PerformMojo throws an error if there are no process args
> --------------------------------------------------------
>
>          Key: MRELEASE-92
>          URL: http://jira.codehaus.org/browse/MRELEASE-92
>      Project: Maven 2.x Release Plugin
>         Type: Bug

>     Versions: 2.0-beta-5
>  Environment: winxp, maven 2.0.4
>     Reporter: Daun DeFrance
>  Attachments: MRELEASE-92.patch
>
>
> While reading the process, PerformReleasMojo.getSystemEnvVars looks for an 
> '=' and then tries to get substrings on either side to form key/value 
> properties.  Under my environment, the index of '=' is -1 and the code does 
> not guard before trying to grab a substring with this index.
> I will attach the diff file of the (very minor) fix to workaround this 
> problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to