Commit Graph

26 Commits

Author SHA1 Message Date
Bryce McKinlay 21f56031ca ResourceBundle.java (bundleCache): Renamed from resourceBundleCache.
2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>

	* java/util/ResourceBundle.java (bundleCache): Renamed from
	resourceBundleCache. Update comments.
	(getObject): Don't catch MissingResourceException.
	(getBundle(String)): Remove 'final'. Use system classloader if
	getCallingClassLoader returned null.
	(getBundle(String, Locale)): Likewise.
	(BundleKey): New private class. HashMap key for bundle cache lookup.
	(lookupKey): New. Singleton instance of BundleKey.
	(nullEntry): New. Cache entry to represent failed lookups.
	(getBundle(String, Locale, ClassLoader)): Re-written to use new
	caching strategy, no-allocation lookup, and new tryBundle methods.
	(tryBundle(String, ClassLoader)): New. Load a locale-qualified
	bundle name using given classloader.
	(tryBundle(String, Locale, ClassLoader, boolean): New. Qualify
	baseName for given Locale and attempt to load bundle.

From-SVN: r84434
2004-07-10 03:14:30 +01:00
Tom Tromey d70bd7fff0 Format.java: Cleaned up imports.
2004-05-05  Tom Tromey  <tromey@redhat.com>

	* java/text/Format.java: Cleaned up imports.
	* java/text/DecimalFormat.java: Cleaned up imports.
	* java/security/SecureRandom.java: Cleaned up imports.
	(SecureRandom): Removed unused variable.
	* java/security/UnresolvedPermission.java: Cleaned up imports.
	* java/util/Date.java (parse): Removed unused variable.
	* java/util/ResourceBundle.java: Cleaned up imports.
	(getBundle): Removed unused variable.
	(tryBundle): Likewise.
	* java/util/regex/Pattern.java (Pattern): Removed unused constructor.

From-SVN: r81503
2004-05-05 06:52:56 +00:00
Michael Koch a17c9f2ea1 MarshalledObject.java, [...]: Fixed javadoc, coding style and argument names all over.
2004-04-20  Michael Koch  <konqueror@gmx.de>

	* java/rmi/MarshalledObject.java,
	java/rmi/Naming.java,
	java/rmi/RemoteException.java,
	java/rmi/activation/ActivationException.java,
	java/rmi/server/ServerCloneException.java,
	java/security/AccessController.java,
	java/security/AlgorithmParameterGenerator.java,
	java/security/AlgorithmParameters.java,
	java/security/CodeSource.java,
	java/security/Identity.java,
	java/security/IdentityScope.java,
	java/security/KeyPairGenerator.java,
	java/security/KeyStore.java,
	java/security/Security.java,
	java/security/Signature.java,
	java/security/SignatureSpi.java,
	java/security/SignedObject.java,
	java/security/spec/DSAParameterSpec.java,
	java/security/spec/DSAPrivateKeySpec.java,
	java/security/spec/DSAPublicKeySpec.java,
	java/sql/Array.java,
	java/sql/DatabaseMetaData.java,
	java/sql/ResultSet.java,
	java/text/ChoiceFormat.java,
	java/text/CollationElementIterator.java,
	java/text/CollationKey.java,
	java/text/Collator.java,
	java/text/DateFormat.java,
	java/text/DateFormatSymbols.java,
	java/text/DecimalFormatSymbols.java,
	java/text/Format.java,
	java/text/ParsePosition.java,
	java/text/RuleBasedCollator.java,
	java/text/SimpleDateFormat.java,
	java/text/StringCharacterIterator.java,
	java/util/Collections.java,
	java/util/PropertyResourceBundle.java,
	java/util/ResourceBundle.java,
	java/util/StringTokenizer.java,
	java/util/jar/Attributes.java,
	java/util/logging/ConsoleHandler.java,
	java/util/logging/LogManager.java,
	java/util/logging/MemoryHandler.java,
	java/util/logging/SocketHandler.java,
	javax/naming/NamingException.java:
	Fixed javadoc, coding style and argument names all over.

From-SVN: r80906
2004-04-20 14:45:10 +00:00
Michael Koch fbba7d6850 PropertyPermission.java: New version from classpath
2003-04-29  Michael Koch  <konqueror@gmx.de>

	* java/util/PropertyPermission.java:
	New version from classpath
	* java/util/ResourceBundle.java:
	Partly merged from classpath
	(getObject): Reformated.
	(tryBundle): Set foundBundle = null if no bundle found.

From-SVN: r66214
2003-04-29 11:36:34 +00:00
Mark Wielaard 24632117ce ResourceBundle.java (resourceBundleCache): Not final.
* java/util/ResourceBundle.java (resourceBundleCache): Not final.
	(lastDefaultLocale): New field.
	(getBundle): When Locale.getDefault != lastDefaultLocale reset
	resourceBundleCache.

From-SVN: r59948
2002-12-08 23:38:02 +00:00
Tom Tromey 76508852a0 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (nat_source_files): Added natVMSecurityManager,
	natResourceBundle.
	* java/util/ResourceBundle.java (Security): Removed.
	(getCallingClassLoader): Now native.
	* java/util/natResourceBundle.cc: New file.
	* java/lang/natVMSecurityManager.cc: New file.
	* java/lang/VMSecurityManager.java (getClassContext): Now native.

From-SVN: r59840
2002-12-05 00:49:30 +00:00
Tom Tromey 8cf3536464 re PR libgcj/6576 (java.util.ResourceBundle.getResource ignores locale)
Fix for PR libgcj/6576:
	* java/util/ResourceBundle.java (tryBundle): Cache `null' if we
	didn't find a given bundle.
	(getBundle): Don't require base bundle.
	(setParent): Removed old comment.
	(tryLocalBundle): Try components even if preceding components were
	empty.

From-SVN: r57442
2002-09-23 17:56:33 +00:00
Tom Tromey 9525891785 ResourceBundle.java: New version from Classpath.
* java/util/ResourceBundle.java: New version from Classpath.
	* java/util/Locale.java: Likewise.

From-SVN: r53351
2002-05-09 23:41:42 +00:00
Mark Wielaard 92aaa24628 Add license clarification.
From-SVN: r49104
2002-01-22 22:40:42 +00:00
Bryce McKinlay 5a1c2f80f1 * java/util/ResourceBundle.java (class Security): Now static.
From-SVN: r46781
2001-11-05 03:22:18 +00:00
Bryce McKinlay cb3f834fb6 ResourceBundle.java (getClassContext): Removed.
* java/util/ResourceBundle.java (getClassContext): Removed.
	(Security): New class, extends SecurityManger.
	(getBundle): Use Security.getCallingClassLoader instead of
	getClassContext.
	* java/util/natResourceBundle.cc: Removed.

From-SVN: r46761
2001-11-04 04:15:09 +00:00
Tom Tromey 03219cb5d9 Configuration.java.in (INIT_LOAD_LIBRARY): New constant.
* gnu/classpath/Configuration.java.in (INIT_LOAD_LIBRARY): New
	constant.
	* java/io/StreamTokenizer.java, java/util/ResourceBundle.java:
	Re-merged with Classpath.

From-SVN: r45835
2001-09-27 00:24:52 +00:00
Anthony Green 9978052974 ResourceBundle fixes
From-SVN: r45472
2001-09-07 18:14:20 +00:00
Tom Tromey 7a95ae6b51 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (ordinary_java_source_files): Removed
	EnumerationChain, added DoubleEnumeration.
	(nat_source_files): Added natResourceBundle.cc.
	* java/util/natResourceBundle.cc: New file.
	* gnu/java/util/DoubleEnumeration.java: New file.
	* gnu/gcj/util/EnumerationChain.java: Removed.
	* java/beans/VetoableChangeSupport.java: Merged with Classpath.
	* java/util/ResourceBundle.java: Merged with Classpath.
	* java/util/StringTokenizer.java: Merged with Classpath.
	* java/util/Locale.java: Merged with Classpath.
	* java/util/Random.java: Merged with Classpath.
	* java/util/PropertyResourceBundle.java: Merged with Classpath.
	* java/util/ListResourceBundle.java: Merged with Classpath.
	* java/util/ConcurrentModificationException.java: Re-merged with
	Classpath.
	* java/util/EmptyStackException.java: Likewise.
	* java/util/MissingResourceException.java: Likewise.
	* java/util/NoSuchElementException.java: Likewise.
	* java/util/TooManyListenersException.java: Likewise.

From-SVN: r45335
2001-08-31 21:31:20 +00:00
Bryce McKinlay 889a80aa95 Forgot this file on last commit.
From-SVN: r41544
2001-04-25 16:48:05 +01:00
Tom Tromey 1e185c02d4 ResourceBundle.java (trySomeGetBundle): Pass class loader to Class.forName.
* java/util/ResourceBundle.java (trySomeGetBundle): Pass class
	loader to Class.forName.

From-SVN: r38289
2000-12-15 15:49:50 +00:00
Tom Tromey cd84842395 * java/util/ResourceBundle.java
(getBundle(String,Locale,ClassLoader)): New method.
	(trySomeGetBundle): Added `loader' argument.
	(partialGetBundle): Likewise.

From-SVN: r38275
2000-12-15 06:51:07 +00:00
Tom Tromey 6c531b0556 ResourceBundle.java (trySomeGetBundle): Removed debugging prints.
* java/util/ResourceBundle.java (trySomeGetBundle): Removed
	debugging prints.

From-SVN: r35859
2000-08-21 21:25:55 +00:00
Bryce McKinlay c7a136d3ef Big AWT patch.
From-SVN: r34976
2000-07-12 04:32:07 +01:00
Tom Tromey 2ba5f77454 All files: Updated copyright information.
* All files: Updated copyright information.
	* COPYING: New file.
	* COPYING.LIB: Removed.
	* LIBGCJ_LICENSE: We now use GPL + special exception.

From-SVN: r32387
2000-03-07 19:55:28 +00:00
Tom Tromey 7c734b1758 * All files: Updated copyright to reflect Cygnus purchase.
From-SVN: r31504
2000-01-19 18:39:27 +00:00
Anthony Green 6c413a50e6 ClassLoader.java (getSystemResource): Use getSystemClassLoader instead of ClassLoader.system.
* java/lang/ClassLoader.java (getSystemResource): Use
        getSystemClassLoader instead of ClassLoader.system.
        (getSystemResourceAsStream): Ditto.

        * java/lang/natClassLoader.cc (redirect): Make static and
        remove #ifdef INTERPRETER so it is always defined.
        (getVMClassLoader0): Remove #ifdef INTERPRETER so it always
        returns a VMClassLoader.

        * java/util/ResourceBundle.java (trySomeGetBundle): Create a
        PropertyResourceBundle if a properties file is found before a
        ResourceBundle class.

From-SVN: r30048
1999-10-17 03:11:50 +00:00
Tom Tromey a81eb01077 ResourceBundle.java (getBundle): Throw NullPointerException if baseName is null.
* java/util/ResourceBundle.java (getBundle): Throw
	NullPointerException if baseName is null.

From-SVN: r27126
1999-05-24 15:00:02 +00:00
Tom Tromey 2b607265f5 ResourceBundle.java (partialGetBundle): Explicitly use locale.toString().
* java/util/ResourceBundle.java (partialGetBundle): Explicitly use
	locale.toString().
	(getBundle): Don't explicitly throw null pointer exception.

From-SVN: r26856
1999-05-10 08:58:54 +00:00
Tom Tromey a0e894a8cc StringBuffer.java (ensureCapacity): Don't resize vector when shared.
* java/lang/StringBuffer.java (ensureCapacity): Don't resize
	vector when shared.
	* java/util/Locale.java (Locale(String,String)): Implement in
	terms of 3-argument version; variant now defaults to empty
	string.
	(toString): Assume variant is not null.
	(equals): Assume all strings are not null.
	(Locale): Throw NullPointerException if any argument is null.
	* java/util/ResourceBundle.java (getBundle): Don't try the base
	name; now implicit in partialGetBundle call.
	(trySomeGetBundle): Search for parent bundles and call setParent
	as required.
	(partialGetBundle): Added `langStop' argument.  Use
	`Locale.toString' to compute bundleName.
	(resource_cache): New static field.
	(partialGetBundle): Cache the returned resource bundle.  Now
	synchronized.
	* gnu/gcj/text/LocaleData_en.java (contents): [collatorRule] Added
	missing `<'.
	* mauve-libgcj: Enable Collator and RuleBasedCollator.
	* java/text/natCollator.cc (decomposeCharacter): `base' now
	`const'.
	* Makefile.in: Rebuilt.
	* Makefile.am (ordinary_java_source_files): Added
	CollationElementIterator, CollationKey, Collator,
	RuleBasedCollator.
	(nat_source_files): Added natCollator.cc.
	* java/text/RuleBasedCollator.java (ceiNext): No longer static.
	(compare): Pass `this' to CollationElementIterator constructor.
	(getCollationElementIterator): Likewise.
	(ceiNext): Fix off-by-one error when finding initial substring.
	(next): Correctly mask off bits when computing return value.
	Fixed return values when one string is shorter than the other.
	* java/text/CollationElementIterator.java (collator): New field.
	(CollationElementIterator): Added collator argument.
	(next): Call ceiNext on collator object.

From-SVN: r26707
1999-04-30 09:31:00 +00:00
Tom Tromey ee9dd3721b Initial revision
From-SVN: r26263
1999-04-07 14:42:40 +00:00