JDK-4336465 : missing exception information for ResourceBundle.getBundle()
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2000-05-08
  • Updated: 2000-07-10
  • Resolved: 2000-07-10
Related Reports
Duplicate :  
Description

Name: rlT66838			Date: 05/08/2000


java version "1.3.0rc3"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc3-Z)
Java HotSpot(TM) Client VM (build 1.3.0rc3-Z, mixed mode)


The documentation for java.util.ResourceBundle omits to mention that each of
the THREE getBundle() methods will throw a MissingResourceException if the bundle can't be found by the class-loader.

http://java.sun.com/j2se/1.3/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String)
http://java.sun.com/j2se/1.3/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String, java.util.Locale)
http://java.sun.com/j2se/1.3/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)

This is easily fixed: in the source for ResourceBundle, add the following line
in the doc comments of each of these methods:

  *  @throws MissingResourceException if the classloader can't find the base
  *                                   class for the resource bundle.
(Review ID: 104541) 
======================================================================

Comments
WORK AROUND Name: rlT66838 Date: 05/08/2000 Discover this the hard way when you get unexpected MissingResourceExceptions cropping up when you were fairly sure you had trapped for them all. ======================================================================
11-06-2004

EVALUATION This has been fixed as part of 4314141. norbert.lindenberg@Eng 2000-07-10
10-07-2000