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 logging with panache in interfaces #29090

Merged
merged 1 commit into from Nov 7, 2022

Conversation

Ladicek
Copy link
Contributor

@Ladicek Ladicek commented Nov 7, 2022

The logging transformation used to add a private static final field to each transformed class. This is invalid in case the transformed class is in fact an interface, because the JVMS requires interface fields to always be public static final.

With this commit, the logging transformation still adds private fields to regular classes, but when the transformed class is an interface, the generated field is public. This is not very nice, but working code trumps aesthetically pleasing code.

Fixes #29072

The logging transformation used to add a `private static final` field
to each transformed class. This is invalid in case the transformed
class is in fact an interface, because the JVMS requires interface
fields to always be `public static final`.

With this commit, the logging transformation still adds `private` fields
to regular classes, but when the transformed class is an interface,
the generated field is `public`. This is not very nice, but working
code trumps aesthetically pleasing code.
@quarkus-bot
Copy link

quarkus-bot bot commented Nov 7, 2022

Failing Jobs - Building 572a790

Status Name Step Failures Logs Raw logs
✔️ JVM Tests - JDK 11
✔️ JVM Tests - JDK 17
JVM Tests - JDK 17 MacOS M1 Set up runner ⚠️ Check → Logs Raw logs
✔️ JVM Tests - JDK 18

@gsmet gsmet merged commit a6e4724 into quarkusio:main Nov 7, 2022
@quarkus-bot quarkus-bot bot added this to the 2.15 - main milestone Nov 7, 2022
@Ladicek Ladicek deleted the logging-panache-interfaces branch November 7, 2022 14:13
@gsmet gsmet modified the milestones: 2.15 - main, 2.14.1.Final Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Illegal field modifiers in class: 0x1A when using io.quarkus.logging.Log in interface default method
2 participants