-
Notifications
You must be signed in to change notification settings - Fork 382
Do not emulate annotations #10132
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
base: main
Are you sure you want to change the base?
Do not emulate annotations #10132
Conversation
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.
This looks right, but why stop here - we've got a few other emulated annotation types that can be removed too:
javax.annotation.Generated
javax.annotation.processing.Generated
org.junit.runner.RunWith
org.junit.runners.SuiteClasses
Do not remove javax.validation.Pattern, as it has inner types like Flag that can't be emulated any other way (though also might not technically be needed for emulation, but might possible be used downstream).
@@ -1,25 +0,0 @@ | |||
/* |
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.
This one is not an annotation, but
- there is no use-case for throwing this from browser code
- both methods declared by this class were missing from emulation
Probably better to remove than add the missing methods.
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.
That does seem like a weird one to be emulated - looks like it could have been a part of a push to emulate anything that can be emulated way back: 21eef3b
That would make it at least possible to handle such exceptions in gwt-rpc clients.
However in this case, since the Method can't be made into a field, without a custom field serializer, this can't work.
Normally I'd be inclined to say we shouldn't take away existing emulation that someone might be using... but I think this one is pretty sketchy to begin with.
Fixes #10131
As pointed out the annotation doesn't have to be emulated at all since #10020 was fixed.