Index: C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/UMultiLineEOLSet.java =================================================================== --- C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/UMultiLineEOLSet.java (revision 415977) +++ C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/UMultiLineEOLSet.java (working copy) @@ -37,7 +37,7 @@ public int matches(int strIndex, CharSequence testString, MatchResultImpl matchResult) { int strDif = matchResult.hasAnchoringBounds() ? matchResult - .getLeftBound() + .getRightBound() - strIndex : testString.length() - strIndex; if (strDif <= 0) { matchResult.setConsumed(consCounter, 0); Index: C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/FinalSet.java =================================================================== --- C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/FinalSet.java (revision 415977) +++ C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/FinalSet.java (working copy) @@ -35,7 +35,7 @@ public int matches(int stringIndex, CharSequence testString, MatchResultImpl matchResult) { if (matchResult.mode() == Matcher.MODE_FIND - || stringIndex == testString.length()) { + || stringIndex == matchResult.getRightBound()) { matchResult.setValid(); matchResult.setEnd(0, stringIndex); return stringIndex; Index: C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/DotQuantifierSet.java =================================================================== --- C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/DotQuantifierSet.java (revision 415977) +++ C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/DotQuantifierSet.java (working copy) @@ -47,7 +47,7 @@ findLineTerminator(stringIndex, strLength, testString); if (startSearch < 0) { - startSearch = testString.length(); + startSearch = matchResult.getRightBound(); } if (startSearch <= stringIndex) { Index: C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/DotAllSet.java =================================================================== --- C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/DotAllSet.java (revision 415977) +++ C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/DotAllSet.java (working copy) @@ -29,7 +29,7 @@ class DotAllSet extends LeafSet { public int accepts(int strIndex, CharSequence testString) { - return (strIndex < testString.length()) ? 1 : -1; + return 1; } protected String getName() { Index: C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/WordBoundary.java =================================================================== --- C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/WordBoundary.java (revision 415977) +++ C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/WordBoundary.java (working copy) @@ -40,7 +40,7 @@ boolean left; boolean right; - char ch1 = stringIndex >= testString.length() ? ' ' : testString + char ch1 = stringIndex >= matchResult.getRightBound() ? ' ' : testString .charAt(stringIndex); char ch2 = stringIndex == 0 ? ' ' : testString.charAt(stringIndex - 1); Index: C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/DotAllQuantifierSet.java =================================================================== --- C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/DotAllQuantifierSet.java (revision 415977) +++ C:/Personal_Stuff/Soft/Eclipse/workspace/harmony_regex/src/main/java/java/util/regex/DotAllQuantifierSet.java (working copy) @@ -36,7 +36,7 @@ public int matches(int stringIndex, CharSequence testString, MatchResultImpl matchResult) { - int strLength = testString.length(); + int strLength = matchResult.getRightBound(); if (strLength <= stringIndex) { return next.matches(stringIndex, testString, matchResult); @@ -46,7 +46,7 @@ public int find(int stringIndex, CharSequence testString, MatchResultImpl matchResult) { - int strLength = testString.length(); + int strLength = matchResult.getRightBound(); if (next.findBack(stringIndex, strLength, testString, matchResult) >= 0) { return stringIndex; } else {