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

(rb) RFE: ResourceBundles shouldn't have to be public.

XMLWordPrintable

    • b38
    • generic
    • generic


      allan.jacobs@Eng 1998-09-21

      Classes that extend ResourceBundle do not work unless they grant
      public access. This makes it impossible to do information hiding
      on internationalization classes. And, it means that the various
      internationalizations have to be in separate files.

      Source code is attached.


      algol% Z.ksh
      java full version "JDK-1.2fcs-J"
      SunOS algol 5.6 Generic sun4u sparc SUNW,Ultra-2
      en_US
      jvs.ch21.KrB@4895d5a3
      jvs.ch21.KrB_en_GB@4fbdd5a3
      jvs.ch21.KrB_fr@4391d5a3
              1
              Default
              Extra
              Exit
              2
              _C_
      en_UK
              UK
              The Exit
              1
              _C_
              2
              Extra
      fr
              France
              Le Exit
              2
              _C_
              3
              Extra
      Exception in thread "main" java.util.MissingResourceException: can't find resource for jvs.ch21.JrB_en_US
              at java.util.ResourceBundle.getBundle(ResourceBundle.java:411)
              at java.util.ResourceBundle.getBundle(ResourceBundle.java:341)
              at jvs.ch21.Y.test(Y.java:14)
              at jvs.ch21.Y.main(Y.java:7)

            okutsu Masayoshi Okutsu
            ajacobssunw Allan Jacobs (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: