[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Re: [commit-cp] RE: [bugs #11728] String.split() function r
From: |
Mark Wielaard |
Subject: |
[cp-patches] Re: [commit-cp] RE: [bugs #11728] String.split() function return worng results for a String with TAB delimiters "t" |
Date: |
Sun, 06 Feb 2005 16:50:44 +0100 |
Hi,
On Tue, 2005-02-01 at 13:57 -0800, Amit Jain wrote:
> Thanks Timo for looking in to this.
>
> I am using open source for the first time. How does this fix get in to the
> GNU source codes for future releases.
One of the GNU Classpath hackers looks at it.
Thinks it is a good patch.
Adds a test to the Mauve testsuite and checks that there are no other
regressions with the suggested fix.
And commits the following change to CVS:
2005-02-06 Mark Wielaard <address@hidden>
Fix suggested by Timo Lindfors <address@hidden>
* java/util/regex/Pattern.java (split(CharSequence,int)):
Fix while empties > 0 loops.
From rom here it will be merged into libgcj, kaffe and other runtimes in the
next couple of days.
Thanks,
Mark
Index: java/util/regex/Pattern.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/regex/Pattern.java,v
retrieving revision 1.9
diff -u -r1.9 Pattern.java
--- java/util/regex/Pattern.java 15 Nov 2004 14:13:26 -0000 1.9
+++ java/util/regex/Pattern.java 6 Feb 2005 15:43:34 -0000
@@ -198,8 +198,11 @@
empties++;
else
{
- while (empties-- > 0)
- list.add("");
+ while (empties > 0)
+ {
+ list.add("");
+ empties--;
+ }
String text = input.subSequence(start, end).toString();
list.add(text);
@@ -222,8 +225,11 @@
int max = limit - list.size();
empties = (empties > max) ? max : empties;
}
- while (empties-- > 0)
- list.add("");
+ while (empties > 0)
+ {
+ list.add("");
+ empties--;
+ }
}
// last token at end
signature.asc
Description: This is a digitally signed message part
- [cp-patches] Re: [commit-cp] RE: [bugs #11728] String.split() function return worng results for a String with TAB delimiters "t",
Mark Wielaard <=