This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Class package-info.class not loaded by ProxyClassLoader when running on Java 9 SE | ||
---|---|---|---|
Product: | platform | Reporter: | adik |
Component: | Module System | Assignee: | Tomas Hurka <thurka> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | Dev | ||
Hardware: | PC | ||
OS: | Windows 10 x64 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Basic findClass implementation for JarClassLoader |
Description
adik
2017-12-04 23:41:20 UTC
Created attachment 165536 [details]
Basic findClass implementation for JarClassLoader
This patch modifies JarClassLoader such that it overrides ClassLoader#findClass(String name) method. The findClass employs doLoadClass directly.
This implementation seems to be correct w.r.t. the Reflection API, since when a class is explored a class loader which loaded it is used. In the platform, this should be the class loader of the module to which the class belongs. Also the relevant package-info should belong to the same module.
This implementation will probably break when the platform is modularized using Java 9 modules. But in this case, the ProxyClassLoader will break anyway since then the loading will not take code path through ProxyClassLoader#loadClass(String, boolean).
|