Skip to content

Conversation

ppkarwasz
Copy link
Contributor

@ppkarwasz ppkarwasz commented Nov 29, 2024

All ServiceLoader.load() calls need a uses clause in the JPMS module descriptor. This PR:

  • Adds the missing @ServiceConsumer annotation to CoreDefaultBundle.
  • To simplify code review, it places @ServiceConsumer on each class (even a test case) that makes a ServiceLoader.load call and only those classes.

Fixes #3250

Since we don't have JPMS tests in the main repo, this PR is blocked by apache/logging-log4j-samples#231

All `ServiceLoader.load()` calls need a `uses` clause in the JPMS module descriptor.
This PR:

- Adds the missing `@ServiceConsumer` annotation to `CoreDefaultBundle`.
- To simplify code review, it places `@ServiceConsumer` on each class that makes a `ServiceLoader.load` call and only those classes.

Closes #3250
@ppkarwasz ppkarwasz self-assigned this Dec 4, 2024
@ppkarwasz ppkarwasz marked this pull request as ready for review March 25, 2025 09:11
@ppkarwasz ppkarwasz moved this from To triage to In review in Log4j bug tracker Mar 25, 2025
@ppkarwasz ppkarwasz added the bug Incorrect, unexpected, or unintended behavior of existing code label Mar 25, 2025
@ppkarwasz ppkarwasz requested a review from jvz April 3, 2025 13:21
@ppkarwasz ppkarwasz merged commit d9811cc into main Apr 3, 2025
9 checks passed
@ppkarwasz ppkarwasz deleted the fix/main/3250_declare_uses branch April 3, 2025 18:00
@github-project-automation github-project-automation bot moved this from In review to Done in Log4j bug tracker Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Incorrect, unexpected, or unintended behavior of existing code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants