Skip to content
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

Fix #5511: don't anymore rely on CodeSource#getLocation() #5519

Merged
merged 8 commits into from
Nov 3, 2024

Conversation

BalusC
Copy link
Contributor

@BalusC BalusC commented Oct 19, 2024

Fix #5511: don't anymore rely on CodeSource#getLocation(), instead obtain the URL of the resource itself via its own class loader

obtain the URL of the resource itself via its own class loader
if (annotatedSet != null) {
for (Class<?> clazz : annotatedSet) {
if (sourceURIString.contains(clazz.getProtectionDomain().getCodeSource().getLocation().toString())) {
String jarURIString = CURRENT_RESOURCE_IN_JAR_PATTERN.split(clazz.getResource(".").toString(), 2)[0];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not seeing a test here that validates this change over?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added integration test: 1ff6714

@BalusC BalusC merged commit 294f871 into 4.0 Nov 3, 2024
3 checks passed
@BalusC BalusC deleted the mojarra_issue_5511_fix_deployment_fail_on_Tomcat_11 branch November 3, 2024 14:07
@BalusC BalusC added this to the 4.0.9 milestone Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants