From 956ed13ee30b6f0a3e898c51f4e953e28f78df00 Mon Sep 17 00:00:00 2001 From: mkoch Date: Thu, 18 Sep 2003 06:34:00 +0000 Subject: 2003-09-18 Ingo Proetel * java/util/TimeZone.java: Initialize lazily. * java/util/Locale.java (readManifest): Fix check for country. * java/util/GregorianCalendar.java: Make use of ResourceBundle better traceable * java/util/Calendar.java: Make use of ResourceBundle better traceable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71509 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/java/util/GregorianCalendar.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'libjava/java/util/GregorianCalendar.java') 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,10 +78,20 @@ 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()); } -- cgit v1.2.1