As discussed on the gcj mailing list recently:
http://gcc.gnu.org/ml/java/2012-03/msg00048.html
I've added an implementation of java.util.regex.Matcher.usePattern(Pattern).
It was pretty simple, not more than a five minute job.
ChangeLog:
2012-03-22 Andrew John Hughes ahug...@redhat.com
* java/util/regex/Matcher.java:
(usePattern(Pattern)): Implemented.
I've also synced in a number of fixes which were only committed to gcj and not
GNU Classpath that I found during the merge:
http://gcc.gnu.org/ml/java-patches/2012-q1/msg00063.html
2012-01-01 Jakub Jelinek ja...@redhat.com
* gnu/java/rmi/registry/RegistryImpl.java (version): Update
copyright notice dates.
* tools/gnu/classpath/tools/orbd/Main.java (run): Likewise.
2007-02-26 Jakub Jelinek ja...@redhat.com
* java/util/TimeZone.java (getDefaultDisplayName): Don't
check if TimeZone is instanceof SimpleTimeZone.
2006-09-13 Andrew Haley a...@redhat.com
* java/util/PriorityQueue.java: Throw IllegalArgumentException for
capacity 1.
(Iterator.remove()): Decrement index after removing element.
2007-02-14 Jakub Jelinek ja...@redhat.com
Andrew Haley a...@redhat.com
* java/util/TimeZone.java (getDateParams): Negate dayOfWeek.
All patches are attached and have been committed.
--
Andrew :)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07
commit 8d06dfcad3d15670c0b14a447ff93821a8f6e369
Author: Andrew Haley a...@redhat.com
Date: Tue Apr 3 12:25:59 2012 +0100
Negate dayOfWeek in java.util.TimeZone.getDateParams.
2007-02-14 Jakub Jelinek ja...@redhat.com
Andrew Haley a...@redhat.com
* java/util/TimeZone.java (getDateParams): Negate dayOfWeek.
Signed-off-by: Andrew John Hughes ahug...@redhat.com
diff --git a/ChangeLog b/ChangeLog
index 1711490..f8bfb96 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-02-14 Jakub Jelinek ja...@redhat.com
+ Andrew Haley a...@redhat.com
+
+ * java/util/TimeZone.java (getDateParams): Negate dayOfWeek.
+
2012-03-22 Andrew John Hughes ahug...@redhat.com
* java/util/regex/Matcher.java:
diff --git a/java/util/TimeZone.java b/java/util/TimeZone.java
index ce59c20..276602e 100644
--- a/java/util/TimeZone.java
+++ b/java/util/TimeZone.java
@@ -1151,18 +1151,30 @@ public abstract class TimeZone implements
java.io.Serializable, Cloneable
int day;
// Month, week of month, day of week
+
+ // Mm.w.d. d is between 0 (Sunday) and 6. Week w is
+ // between 1 and 5; Week 1 is the first week in which day d
+ // occurs and Week 5 specifies the last d day in the month.
+ // Month m is between 1 and 12.
+
month = Integer.parseInt(date.substring(1, date.indexOf('.')));
int week = Integer.parseInt(date.substring(date.indexOf('.') + 1,
date.lastIndexOf('.')));
int dayOfWeek = Integer.parseInt(date.substring(date.lastIndexOf('.')
+ 1));
-if (week == 5)
- day = -1; // last day of month is -1 in java, 5 in TZ
-else
- // first day of week starting on or after.
- day = (week - 1) * 7 + 1;
+ dayOfWeek++; // Java day of week is one-based, Sunday is first day.
+
+ if (week == 5)
+ day = -1; // last day of month is -1 in java, 5 in TZ
+ else
+ {
+ // First day of week starting on or after. For example,
+ // to specify the second Sunday of April, set month to
+ // APRIL, day-of-month to 8, and day-of-week to -SUNDAY.
+ day = (week - 1) * 7 + 1;
+ dayOfWeek = -dayOfWeek;
+ }
-dayOfWeek++; // Java day of week is one-based, Sunday is first day.
month--; // Java month is zero-based.
return new int[] { month, day, dayOfWeek };
}
commit 7dbf9fc8c6b98137c4db3d8a6c63e5344746fefd
Author: Andrew Haley a...@redhat.com
Date: Tue Apr 3 12:31:42 2012 +0100
Decrement index when removing elements from PriorityQueue. Catch capacity
1.
2006-09-13 Andrew Haley a...@redhat.com
* java/util/PriorityQueue.java: Throw IllegalArgumentException for
capacity 1.
(Iterator.remove()): Decrement index after removing element.
Signed-off-by: Andrew John Hughes ahug...@redhat.com
diff --git a/ChangeLog b/ChangeLog
index f8bfb96..f935a45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-13 Andrew Haley a...@redhat.com
+
+ * java/util/PriorityQueue.java: Throw IllegalArgumentException for
+ capacity 1.
+ (Iterator.remove()): Decrement index after removing element.
+
2007-02-14 Jakub Jelinek ja...@redhat.com
Andrew Haley