-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #4304: ResourceConfig not properly using specified ClassLoader #4305
Conversation
…kageNamesScanner to load classes
// Workaround because otherwise classes from a different classloader can't be loaded | ||
if (resourceFinder instanceof PackageNamesScanner) { | ||
final ClassLoader classLoader = ((PackageNamesScanner) resourceFinder).getClassloader(); | ||
afl = AnnotationAcceptingListener.newJaxrsResourceAndProviderListener(classLoader); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not do this when the default ClassLoader:
if (!getClassLoader().equals(classLoader)) {
afl = AnnotationAcceptingListener.newJaxrsResourceAndProviderListener(classLoader);
}
@@ -896,10 +927,11 @@ public boolean isRegistered(final Class<?> componentClass) { | |||
} | |||
} | |||
} | |||
|
|||
result.addAll(afl.getAnnotatedClasses()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (parentAfl != afl)
} | ||
} | ||
|
||
result.addAll(afl.getAnnotatedClasses()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+result.addAll(parentAfl.getAnnotatedClasses());
See Wiki |
Apparently I forgot to add the "Signed off by: *" to the commit. According to the wiki, it needs to be included to every commit I made. What should I do now, because the two commits don't have it, even tho it's signed? EDIT: I guess the easiest would be deleting my fork, doing the changes again but signed off this time and then creating a new PR? |
See #4306, sorry again. |
This PR fixes the problem (eventually a bug?) in the issue #4304.
Please review, tell me what to change and then eventually merge the PR.
If you won't merge it, I'd like to know why, because I don't wanna maintain my own fork.