(rb) ResourceBundle and MissingResourceException should support 'cause'

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 6
    • Affects Version/s: 1.4.0, 1.4.2, 6
    • Component/s: core-libs
    • b38
    • generic, x86
    • generic, windows_nt, windows_xp


      If a properties file has a wrong unicode notation such as the typo \uu instead of \u, for example, in MyProperty.properties

      mykey=\uu006c

      ResourceBundle.getBundle("MyProperty") throws MissingResourceException which doesn't help in debugging. Let's say the properties file size is very big and each line has a long \u notated string. And only one has a typo out of several thousand chars. It is almost impossible to find this typo from the MissingResourceException message.

      Exception message should be a malformed encode instead.

      This unclear exception message is because the catch block of ResourceBundle.java(line#944) does nothing and just exit.

      return new PropertyResourceBundle(stream);
      } catch( Exception e ) {
      }

      If there is e.printStackTrace() in the catch it prints out the exact reason for failing.

      bae-chul.kim@eng 2000-07-18

            Assignee:
            Masayoshi Okutsu
            Reporter:
            Bae-chul Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: