Skip to content

Moduleloading: Fix loading of classes in packages only present as versioned entries#9396

Open
matthiasblaesing wants to merge 2 commits into
apache:masterfrom
matthiasblaesing:versioned_jarfile_packages
Open

Moduleloading: Fix loading of classes in packages only present as versioned entries#9396
matthiasblaesing wants to merge 2 commits into
apache:masterfrom
matthiasblaesing:versioned_jarfile_packages

Conversation

@matthiasblaesing
Copy link
Copy Markdown
Contributor

The NetBeans classloader infrastructure relies on a mapping of packages
classloaders can load resources/classes from. That mapping is currently
not scanning META-INF/versions/ for packages. This becomes a
problem if the versioned folder contains packages not present in the
non-versioned part of the JAR.

This change adds coverage for the versioned folder.

Closes: #9371

@matthiasblaesing matthiasblaesing added this to the NB31 milestone May 17, 2026
@matthiasblaesing matthiasblaesing added the ci:all-tests [ci] enable all tests label May 17, 2026
- General cleanups
- JarClassLoader#addURL is unused
- JarClassLoader#getClassData is unused
- Archive#isActive is unused
…sioned entries

The NetBeans classloader infrastructure relies on a mapping of packages
classloaders can load resources/classes from. That mapping is currently
not scanning META-INF/versions/<version> for packages. This becomes a
problem if the versioned folder contains packages not present in the
non-versioned part of the JAR.

This change adds coverage for the versioned folder.

Closes: apache#9371
@matthiasblaesing matthiasblaesing force-pushed the versioned_jarfile_packages branch from 8d8e8d7 to fc5f876 Compare May 17, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:all-tests [ci] enable all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OneModuleClassLoader / JarClassLoader doesnt load versioned classess in MR (Multi-Release) jars

1 participant