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=21373>.
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=21373

Multiple packages in CvsTagDiff causes StringIndexOutOfBounds





------- Additional Comments From [EMAIL PROTECTED]  2003-07-10 16:03 -------
Well, the line returned by CVS actually has the top level (ie CVS) module in 
it, but CvsTagDiff.java removes it.  The line reads:

File Module/Package/Blah/Something.java changed from revision 1.2 to 1.2.1

and CvsTagDiff.java removes the 'File Module/' part.  In the existing code, it 
uses the string length of the module name plus 5 plus 1 [ie "File 
Module/".length()], and my patch just removed everything up to and including 
the first '/' so that it would do so for any module name length.

The code could be changed to only remove the module name if there is only one 
package specified.  ie if multiple packages are specified, the results could 
span multiple CVS modules, hence they should be returned.  This could cause 
problems if any package names have spaces in them (ie how else are you going to 
tell multiple packages have been specified, if not by checking for spaces?).

Alternatively, the code could be changed to always return the module name, but 
this would probably break a few existing systems.  

Therefore I propose a compromise - how about adding a boolean attribute to the 
<cvstagdiff> task to specify whether or not to return the module?  eg:

<cvstagdiff package="Version2.0/Some/Directory Version3.0/Some/Other/Stuff" 
returnmodulenames="true" .... />

Default it to false, hence existing code doesn't break.  Nice.

What do you think?

Cheers

Rory

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to