diff options
| author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-18 06:34:00 +0000 |
|---|---|---|
| committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-18 06:34:00 +0000 |
| commit | 956ed13ee30b6f0a3e898c51f4e953e28f78df00 (patch) | |
| tree | 61bd85f20d1ef3c7e21d095638be5c58a494ab1a /libjava/java/util/GregorianCalendar.java | |
| parent | e84af61cc5b15bd6e9057aff844426df01246b9e (diff) | |
| download | gcc-956ed13ee30b6f0a3e898c51f4e953e28f78df00.tar.gz | |
2003-09-18 Ingo Proetel <proetel@aicas.com>
* 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
Diffstat (limited to 'libjava/java/util/GregorianCalendar.java')
| -rw-r--r-- | libjava/java/util/GregorianCalendar.java | 14 |
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()); } |
