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

Exclude annotation members from aggressive overloading #453

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Nolij
Copy link

@Nolij Nolij commented Dec 11, 2024

Aggressive overloading class members of annotations can cause errors like this:

Caused by: java.lang.annotation.AnnotationFormatError: java.lang.IllegalArgumentException: methods with same signature a() but incompatible return types: boolean and others
	at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:78)
	at java.base/java.lang.reflect.Field.declaredAnnotations(Field.java:1211)
	at java.base/java.lang.reflect.Field.declaredAnnotations(Field.java:1209)
	at java.base/java.lang.reflect.Field.getAnnotation(Field.java:1176)

This PR excludes annotation class members from aggressive overloading, allowing them to still be obfuscated and for the rest of a project to have aggressive overloading enabled.

Copy link

sonarcloud bot commented Dec 11, 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.

1 participant