-
Notifications
You must be signed in to change notification settings - Fork 3k
Handle method parameter type annotations in ClassComparisonUtil #47932
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
Handle method parameter type annotations in ClassComparisonUtil #47932
Conversation
Such annotations are present 2 times in bytecode :-) Other than that, this LGTM. |
break; | ||
case TYPE: | ||
TypeTarget.Usage usage = i.target().asType().usage(); | ||
if (usage == TypeTarget.Usage.METHOD_PARAMETER) { |
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.
I'm fairly sure at least Usage.EMPTY
is quite realistic (type annotation on return type), and there's a few other kinds of usages that may legitimately occur. But I agree we can deal with those as they come.
Status for workflow
|
Fixes live-Reload with instrumentation, if the class uses annotations with target "TYPE_USE" (e.g. jakarta.validation.Valid).
Such annotations are reported 2 times by jandex (once as method parameter annotation and once as method parameter type annotation).
Example:
Changing the local variable "x" in the example and sending a HTTP-Request would log an exception and restart the server.
Exception: