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

Should use internal class name when calling ClassLoader.getResourceAsByteArray

XMLWordPrintable

    • b27
    • Verified

      When fixing JDK-8343427, an external class name (e.g. pkg1.Foo) was used when calling ClassLoader.getResourceAsByteArray(String name). The API expects an internal class name (e.g. pkg1/Foo) and returns a null byte array if it can't find the resource. This in turns will trigger the following assert in FileMapInfo::get_stream_from_class_loader():

      assert(obj != nullptr, "ClassLoader.getResourceAsByteArray should not return null");

            ccheung Calvin Cheung
            ccheung Calvin Cheung
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: