summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2007-03-07 22:26:34 +0000
committerTom Tromey <tromey@redhat.com>2007-03-07 22:26:34 +0000
commitceb81d5024181e077f6a6ce012c91e1e0d41ee9c (patch)
tree9b17c484f42b977e292df4554782ea3301b2dd33
parent5504f73ade9e6b896593149f8d7c8a6c782b9d03 (diff)
downloadclasspath-ceb81d5024181e077f6a6ce012c91e1e0d41ee9c.tar.gz
PR classpath/31057:
* java/util/regex/Pattern.java (toString): New method.
-rw-r--r--ChangeLog5
-rw-r--r--java/util/regex/Pattern.java12
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 81954d033..2a4bed1ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-07 Tom Tromey <tromey@redhat.com>
+
+ PR classpath/31057:
+ * java/util/regex/Pattern.java (toString): New method.
+
2007-03-07 Gary Benson <gbenson@redhat.com>
* resource/META-INF/services/org.w3c.dom.DOMImplementationSourceList:
diff --git a/java/util/regex/Pattern.java b/java/util/regex/Pattern.java
index 25120a8c7..217ce0862 100644
--- a/java/util/regex/Pattern.java
+++ b/java/util/regex/Pattern.java
@@ -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 @@ public final class Pattern implements Serializable
{
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;
+ }
}