harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r559424 - /harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Matcher.java
Date Wed, 25 Jul 2007 12:37:36 GMT
Author: tellison
Date: Wed Jul 25 05:37:35 2007
New Revision: 559424

URL: http://svn.apache.org/viewvc?view=rev&rev=559424
Log:
Apply fix for HARMONY-4396 ([classlib][regex] Matcher.hitEnd() returns invalid value if a
match isn't found after find() method is called)

Modified:
    harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Matcher.java

Modified: harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Matcher.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Matcher.java?view=diff&rev=559424&r1=559423&r2=559424
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Matcher.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Matcher.java
Wed Jul 25 05:37:35 2007
@@ -15,10 +15,6 @@
  *  limitations under the License.
  */
 
-/**
- * @author Nikolay A. Kuznetsov
- * @version $Revision: 1.22.2.2 $
- */
 package java.util.regex;
 
 import java.util.ArrayList;
@@ -26,11 +22,7 @@
 import org.apache.harmony.regex.internal.nls.Messages;
 
 /**
- * @com.intel.drl.spec_ref
- * 
  * Note: main functionality of this class is hidden into nodes match methods. 
- * @author Nikolay A. Kuznetsov
- * @version $Revision: 1.22.2.2 $
  */
 public final class Matcher implements MatchResult {
 
@@ -295,7 +287,11 @@
         matchResult.reset();
         matchResult.setMode(Matcher.MODE_FIND);
         matchResult.setStartIndex(startIndex);
-        return start.find(startIndex, string, matchResult);
+        int foundIndex = start.find(startIndex, string, matchResult);
+        if (foundIndex == -1) {
+            matchResult.hitEnd = true;
+        }
+        return foundIndex;
     }
 
 	/**



Mime
View raw message