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  <[EMAIL PROTECTED]>

        Resynced with GNU Classpath.

        2005-02-06  Mark Wielaard  <[EMAIL PROTECTED]>

        Reported by Timo Lindfors <[EMAIL PROTECTED]>
        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  <[EMAIL PROTECTED]>
 
+        Reported by Timo Lindfors <[EMAIL PROTECTED]>
+        java/util/regex/Matcher.java (lookingAt): Set position when match
+        found.
+        (matches): Implemented through lookingAt().
+
+2005-02-10  Dalibor Topic  <[EMAIL PROTECTED]>
+
+       Resynced with GNU Classpath.
+
+       2005-02-06  Mark Wielaard  <[EMAIL PROTECTED]>
+
         Fix suggested by Timo Lindfors <[EMAIL PROTECTED]>
         * 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;
   }
   
   /**

_______________________________________________
kaffe mailing list
[email protected]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to