[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: regex fix

Kaffe CVS cvs-commits at kaffe.org
Thu Feb 10 15:02:48 PST 2005


PatchSet 5514 
Date: 2005/02/10 22:58:12
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: regex fix

2005-02-10  Dalibor Topic  <robilad at kaffe.org>

        Resynced with GNU Classpath.

        2005-02-06  Mark Wielaard  <mark at klomp.org>

        Fix suggested by Timo Lindfors <timo.lindfors at iki.fi>
        * java/util/regex/Pattern.java (split(CharSequence,int)):
        Fix while empties > 0 loops.

Members: 
	ChangeLog:1.3558->1.3559 
	libraries/javalib/java/util/regex/Pattern.java:1.9->1.10 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3558 kaffe/ChangeLog:1.3559
--- kaffe/ChangeLog:1.3558	Thu Feb 10 22:46:41 2005
+++ kaffe/ChangeLog	Thu Feb 10 22:58:12 2005
@@ -1,5 +1,15 @@
 2005-02-10  Dalibor Topic  <robilad at kaffe.org>
 
+	Resynced with GNU Classpath.
+
+	2005-02-06  Mark Wielaard  <mark at klomp.org>
+
+        Fix suggested by Timo Lindfors <timo.lindfors at iki.fi>
+        * java/util/regex/Pattern.java (split(CharSequence,int)):
+        Fix while empties > 0 loops.
+
+2005-02-10  Dalibor Topic  <robilad at kaffe.org>
+
 	* libraries/javalib/java/lang/Thread.java (sleep): Improved
 	exception messages.
 
Index: kaffe/libraries/javalib/java/util/regex/Pattern.java
diff -u kaffe/libraries/javalib/java/util/regex/Pattern.java:1.9 kaffe/libraries/javalib/java/util/regex/Pattern.java:1.10
--- kaffe/libraries/javalib/java/util/regex/Pattern.java:1.9	Fri Dec 10 21:29:36 2004
+++ kaffe/libraries/javalib/java/util/regex/Pattern.java	Thu Feb 10 22:58:16 2005
@@ -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




More information about the kaffe mailing list