harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r979776 - in /harmony/enhanced/java/branches/java6: ./ classlib/ classlib/depends/libs/ classlib/modules/regex/src/main/java/java/util/regex/ classlib/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/ drlvm/ jdktools/
Date Tue, 27 Jul 2010 17:06:51 GMT
Author: hindessm
Date: Tue Jul 27 17:06:47 2010
New Revision: 979776

URL: http://svn.apache.org/viewvc?rev=979776&view=rev
Log:
Merge change from /harmony/enhanced/java/trunk@979659:

  r979659 | tellison | 2010-07-27 13:09:54 +0100 (Tue, 27 Jul 2010) | 2 lines
  
  Apply patch for HARMONY-6600 ([classlib][regex]Matcher does not override the toString()
mentioned in spec on harmony 5)
  


Modified:
    harmony/enhanced/java/branches/java6/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/depends/libs/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/modules/regex/src/main/java/java/util/regex/Matcher.java
    harmony/enhanced/java/branches/java6/classlib/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/MatcherTest.java
    harmony/enhanced/java/branches/java6/drlvm/   (props changed)
    harmony/enhanced/java/branches/java6/jdktools/   (props changed)

Propchange: harmony/enhanced/java/branches/java6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 27 17:06:47 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/java/branches/mrh:935751-941490
-/harmony/enhanced/java/trunk:929253-979569,979593,979613,979615
+/harmony/enhanced/java/trunk:929253-979569,979593,979613,979615,979659
 /harmony/enhanced/trunk:476395-929252
 /incubator/harmony/enhanced/trunk:292550-476394

Propchange: harmony/enhanced/java/branches/java6/classlib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 27 17:06:47 2010
@@ -1,7 +1,7 @@
 /harmony/enhanced/classlib/trunk:713674-735919,765923-926091,926318-926838
 /harmony/enhanced/classlib/trunk/working_classlib:884014-884286
 /harmony/enhanced/java/branches/mrh/classlib:935751-941490
-/harmony/enhanced/java/trunk/classlib:929253-979569,979593,979613,979615
+/harmony/enhanced/java/trunk/classlib:929253-979569,979593,979613,979615,979659
 /harmony/enhanced/trunk/classlib:476395-929252
 /harmony/enhanced/trunk/working_classlib:476396-920147
 /incubator/harmony/enhanced/trunk/classlib:292550-476394

Propchange: harmony/enhanced/java/branches/java6/classlib/depends/libs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 27 17:06:47 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/classlib/trunk/depends/libs:544451-926091
-/harmony/enhanced/java/trunk/classlib/depends/libs:929253-979569,979593,979613,979615
+/harmony/enhanced/java/trunk/classlib/depends/libs:929253-979569,979593,979613,979615,979659
 /harmony/enhanced/trunk/classlib/depends/libs:476395-929252
 /incubator/harmony/enhanced/trunk/classlib/depends/libs:292550-476394

Modified: harmony/enhanced/java/branches/java6/classlib/modules/regex/src/main/java/java/util/regex/Matcher.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/regex/src/main/java/java/util/regex/Matcher.java?rev=979776&r1=979775&r2=979776&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/regex/src/main/java/java/util/regex/Matcher.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/regex/src/main/java/java/util/regex/Matcher.java
Tue Jul 27 17:06:47 2010
@@ -687,4 +687,16 @@ public final class Matcher implements Ma
         matchResult = new MatchResultImpl(cs, leftBound, rightBound, pat
                 .groupCount(), pat.compCount(), pat.consCount());
     }
+
+    @Override
+    public String toString() {
+        String lastMatch = "";
+        try {
+            lastMatch = Integer.toString(start());
+        } catch (IllegalStateException e) {
+        }
+        return getClass().getCanonicalName() + "[pattern=" + pat + " region="
+                + matchResult.getLeftBound() + ","
+                + matchResult.getRightBound() + " lastmatch=" + lastMatch + "]";
+    }
 }

Modified: harmony/enhanced/java/branches/java6/classlib/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/MatcherTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/MatcherTest.java?rev=979776&r1=979775&r2=979776&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/MatcherTest.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/MatcherTest.java
Tue Jul 27 17:06:47 2010
@@ -735,6 +735,16 @@ public class MatcherTest extends TestCas
                 "----1 fish 2 fish red fish 5----", false);
     }
 
+    /*
+     * Test if Matcher's toString conatain pattern information
+     */
+    public void testToString() {
+        String result = Pattern.compile("(\\d{1,3})").matcher(
+                "aaaa123456789045").toString();
+        assertTrue("The result doesn't contain pattern info", result
+                .contains("(\\d{1,3})"));
+    }
+
     private void hitEndTest(boolean callFind, String testNo, String regex,
             String input, boolean hit) {
         Pattern pattern = Pattern.compile(regex);

Propchange: harmony/enhanced/java/branches/java6/drlvm/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 27 17:06:47 2010
@@ -1,5 +1,5 @@
 /harmony/enhanced/java/branches/mrh/drlvm:935751-941490
-/harmony/enhanced/java/trunk/drlvm:929253-979569,979593,979613,979615
+/harmony/enhanced/java/trunk/drlvm:929253-979569,979593,979613,979615,979659
 /harmony/enhanced/trunk/drlvm:476395-929252
 /harmony/enhanced/trunk/working_vm:476396-920147
 /incubator/harmony/enhanced/trunk/drlvm:292550-476394

Propchange: harmony/enhanced/java/branches/java6/jdktools/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 27 17:06:47 2010
@@ -1,4 +1,4 @@
-/harmony/enhanced/java/trunk/jdktools:929253-979569,979593,979613,979615
+/harmony/enhanced/java/trunk/jdktools:929253-979569,979593,979613,979615,979659
 /harmony/enhanced/jdktools/trunk:630107-925933
 /harmony/enhanced/trunk/jdktools:476395-929252
 /harmony/enhanced/trunk/working_jdktools:476396-920147



Mime
View raw message