I'm checking this in.

This fixes PR 31057.

Tom

Index: ChangeLog
from  Tom Tromey  <[EMAIL PROTECTED]>

        PR classpath/31057:
        * java/util/regex/Pattern.java (toString): New method.

Index: java/util/regex/Pattern.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/regex/Pattern.java,v
retrieving revision 1.19
diff -u -r1.19 Pattern.java
--- java/util/regex/Pattern.java 19 Dec 2006 01:14:24 -0000 1.19
+++ java/util/regex/Pattern.java 7 Mar 2007 22:25:13 -0000
@@ -1,5 +1,5 @@
 /* Pattern.java -- Compiled regular expression ready to be applied.
-   Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -260,4 +260,14 @@
   {
     return regex;
   }
+
+  /**
+   * Return the regular expression used to construct this object.
+   * @specnote Prior to JDK 1.5 this method had a different behavior
+   * @since 1.5
+   */
+  public String toString()
+  {
+    return regex;
+  }
 }

Reply via email to