Repository navigation
[OPENJPA-3013] Collect the candidate loaders without a MultiClassLoader - #212
Merged
Merged
Conversation
The loaders to consult were collected into a MultiClassLoader and unwrapped again, which only served to keep the protected hook that contributes them. Collect them into a list and build the array from it instead. The hook therefore takes a List<ClassLoader>; the MultiClassLoader overload is deprecated for removal and no longer called, so a subclass overriding it has to move to the new signature.
cristof
approved these changes
Oct 9, 2026
cristof
approved these changes
Oct 11, 2026
rmannibucau
approved these changes
Oct 11, 2026
Contributor
|
It seems I'm a bit late at the party ... |
Contributor
|
@solomax, sorry (again)! I thought you had approved the PR. I'll be more attentive next time. |
Contributor
|
not a big deal @cristof :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applies @rmannibucau suggestion from #210: the candidate loaders were collected into a
MultiClassLoaderand unwrapped again immediately, which is a surprising use of a class loader as a container. They are now collected into aList<ClassLoader>and the array is built from it.The container only existed to keep the protected hook that contributes the loaders, so that hook now takes a
List<ClassLoader>. TheMultiClassLoaderoverload is deprecated for removal and is no longer called — a subclass overriding it has to move to the new signature.Serializationis an internal utility andPersistentObjectInputStreamis the only in-tree override; shout if you would rather keep the old hook consulted for compatibility.No behaviour change otherwise: loader order, de-duplication, null filtering and the fallback to the stream own
resolveClassare untouched, andTestSerializationClassResolving(4 tests) stays green, as does the kernel module.TestDetachedStateManagererrors 10/10 both here and on unmodified master (CREATE TABLE SEC1_TAB ()), so it is pre-existing and unrelated.