[kaffe] CVS kaffe (robilad): resynced with gnu classpath: regex fix

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


PatchSet 5515 
Date: 2005/02/10 23:03:53
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>

        Reported by Timo Lindfors <timo.lindfors at iki.fi>
        java/util/regex/Matcher.java (lookingAt): Set position when match
        found.
        (matches): Implemented through lookingAt().

Members: 
	ChangeLog:1.3559->1.3560 
	libraries/javalib/java/util/regex/Matcher.java:1.7->1.8 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3559 kaffe/ChangeLog:1.3560
--- kaffe/ChangeLog:1.3559	Thu Feb 10 22:58:12 2005
+++ kaffe/ChangeLog	Thu Feb 10 23:03:53 2005
@@ -4,6 +4,17 @@
 
 	2005-02-06  Mark Wielaard  <mark at klomp.org>
 
+        Reported by Timo Lindfors <timo.lindfors at iki.fi>
+        java/util/regex/Matcher.java (lookingAt): Set position when match
+        found.
+        (matches): Implemented through lookingAt().
+
+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.
Index: kaffe/libraries/javalib/java/util/regex/Matcher.java
diff -u kaffe/libraries/javalib/java/util/regex/Matcher.java:1.7 kaffe/libraries/javalib/java/util/regex/Matcher.java:1.8
--- kaffe/libraries/javalib/java/util/regex/Matcher.java:1.7	Wed Nov 24 03:20:44 2004
+++ kaffe/libraries/javalib/java/util/regex/Matcher.java	Thu Feb 10 23:03:57 2005
@@ -212,7 +212,10 @@
     if (match != null)
       {
 	if (match.getStartIndex() == 0)
-	  return true;
+	  {
+	    position = match.getEndIndex();
+	    return true;
+	  }
 	match = null;
       }
     return false;
@@ -230,7 +233,13 @@
    */
   public boolean matches ()
   {
-    return find(0);
+    if (lookingAt())
+      {
+	if (position == input.length())
+	  return true;
+	match = null;
+      }
+    return false;
   }
   
   /**




More information about the kaffe mailing list