Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4255366

ResourceBundle.getBundle should document ClassCastException case

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.1
    • core-libs



      Name: vi73552 Date: 07/19/99


      The ResourceBundle documentation should mention what it might
      mean if getBundle throws a ClassCastException.

      (What it might means it that you've requested resource bundle
      named p1.Something but you already have a class p1.Something
      (that does not extend ResourceBundle).)

      (I was expecting to load resources from a file Messages.properties.
      However, I happened to have a class named Messages in the same
      package (and it didn't extend ResourceBundle), so of course I
      got a ClassCastException from several levels inside getBundle().)

      DSB/DFI
      (Review ID: 85704)
      ======================================================================

            nlindenbsunw Norbert Lindenberg (Inactive)
            vasya Vassili Igouchkine (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: