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: |
Hide-Classpath-Packages does not mask Package versions |
Product: |
platform
|
Reporter: |
Svata Dedic <sdedic> |
Component: |
Module System | Assignee: |
Tomas Hurka <thurka> |
Status: |
RESOLVED
FIXED
|
|
|
Severity: |
normal
|
CC: |
jtulach
|
Priority: |
P1
|
|
|
Version: |
Dev | |
|
Hardware: |
PC | |
|
OS: |
Linux | |
|
Issue Type:
|
DEFECT
|
Exception Reporter:
|
|
Attachments: |
Proposed fix
|
Created attachment 163752 [details] Proposed fix OpenIDE-Module-Hide-Classpath-Packages hides resources from the enumerated (sub)packages from the app classloader. But when searching for Package version, the exclusion does not work. Resources from JDK are filtered out, but Package objects, incl. their 'sealed' property are not. In JDK9, modules have sealed packages, and if javac implementation from JDK loads before NB javac' implementation for some reason (e.g. jshell :)), NetBeans classloader will throw SecurityException when it attempts to lead nb-javac code. The attached patch should make the check for package objects evaluate the same way as for resources within that package. Please review.