This is the mail archive of the
mailing list for the Mauve project.
Re: Can I commit a bug fix in CreateTags.java ?
David Gilbert a écrit :
Fabien DUMINY wrote:I tried with Sun's jdk 1.5.0_03 and Classpath under eclipse
Michael Koch a écrit :I ran the CreateTags program (for the first time) and didn't see a
problem. Here's the first few lines of the output file:
On Sat, Sep 17, 2005 at 01:24:00PM +0200, Fabien DUMINY wrote:Here is the patch (joined file).
I found and fixed a bug in CreateTags. The ';' wasn't removed from
the package declaration and it was written in the testlet className.
Can I commit the bug fix (when I will have the rights to do) ?
I ask you that question because I read that such modification (in
the core of Mauve, not in the testlets) should be discussed here.
Please send a patch representing this change here.
RCS file: /cvs/mauve/mauve/gnu/testlet/runner/CreateTags.java,v
retrieving revision 1.1
diff -u -r1.1 CreateTags.java
--- CreateTags.java 1 Jul 2005 18:33:43 -0000 1.1
+++ CreateTags.java 17 Sep 2005 12:14:22 -0000
@@ -130,7 +130,10 @@
tags = line;
else if(buf.indexOf("package ") == 0)
- pckage = buf.substring(8, buf.length()-1);
+ int idx = buf.lastIndexOf(";");
+ pckage = buf.substring(8, idx);
buf = new StringBuffer();
What do you get when you run it? What are you running it with? (I
tried both JamVM with Classpath CVS and Sun's JDK1.4.2_08 on GNU Linux).
Without that patch I get something like that
So, for me, the ';' at the end of the package declaration is not removed.
I think that it is due to the fact that under Windows end of line are on
2 characters CR LF ("\r\n") and Linux it is only 1 character.
In fact, the patch give something more safe even on Linux because we can
be sure that nobody will add blank characters after the ';' on the
package declaration line.
Ok, I must say that I forgot to add a trim() on the package name, in
case of there were some blank(s) between it and the ';'.
... maybe the ';' can also be on the next line but I don't thnik that