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

InternalError when unnamed module finds a resource bundle encapsulated in a named module

    Details

      Description

      when issue https://bugs.openjdk.java.net/browse/JDK-8136802 happens, we got a error message "java.lang.InternalError: legacy getBundle can't be used to find test.pkg.ClassResource in module mod.test". but maybe it's better to throw MissingResourceBundleException.

      Below is from Daniel :
      if some code in an unnamed module calls ResourceBundle.getBundle,
      passing (maybe by mistake) the name of a resource bundle that happens
      to be located in a named module, then in my opinion it should get
      MissingResourceBundleException, not InternalError.

      This is fine for prototyping and debugging - but I hope InternalError
      will be replaced in the final implementation.

        Issue Links

          Activity

          Hide
          okutsu Masayoshi Okutsu added a comment -
          I tend to agree that public APIs shouldn't throw an InternalError because of its usage.
          Show
          okutsu Masayoshi Okutsu added a comment - I tend to agree that public APIs shouldn't throw an InternalError because of its usage.
          Hide
          okutsu Masayoshi Okutsu added a comment -
          Show
          okutsu Masayoshi Okutsu added a comment - InternalError fixes: java.util.Class: http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/f7e100339605 java.util.ResourceBundle: http://hg.openjdk.java.net/jigsaw/jake/jdk/rev/e105625ec661

            People

            • Assignee:
              okutsu Masayoshi Okutsu
              Reporter:
              mli Hamlin Li
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: