aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/util/GregorianCalendar.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/util/GregorianCalendar.java')
-rw-r--r--libjava/java/util/GregorianCalendar.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/libjava/java/util/GregorianCalendar.java b/libjava/java/util/GregorianCalendar.java
index b01d971edca..91f5890ef06 100644
--- a/libjava/java/util/GregorianCalendar.java
+++ b/libjava/java/util/GregorianCalendar.java
@@ -78,11 +78,21 @@ public class GregorianCalendar extends Calendar
static final long serialVersionUID = -8125100834729963327L;
/**
- * The name of the resource bundle.
+ * The name of the resource bundle. Used only by getBundle()
*/
private static final String bundleName = "gnu.java.locale.Calendar";
/**
+ * get resource bundle:
+ * The resources should be loaded via this method only. Iff an application
+ * uses this method, the resourcebundle is required. --Fridi.
+ */
+ private static ResourceBundle getBundle(Locale locale)
+ {
+ return ResourceBundle.getBundle(bundleName, locale);
+ }
+
+ /**
* Constructs a new GregorianCalender representing the current
* time, using the default time zone and the default locale.
*/
@@ -120,7 +130,7 @@ public class GregorianCalendar extends Calendar
public GregorianCalendar(TimeZone zone, Locale locale)
{
super(zone, locale);
- ResourceBundle rb = ResourceBundle.getBundle(bundleName, locale);
+ ResourceBundle rb = getBundle(locale);
gregorianCutover = ((Date) rb.getObject("gregorianCutOver")).getTime();
setTimeInMillis(System.currentTimeMillis());
}