-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Check reachability of sub resources before indexing them #46464
Check reachability of sub resources before indexing them #46464
Conversation
This makes sure, that the absent and present sub resources can actually be reached from a root resource class in the server endpoint indexer. Otherwise, e.g. client sub resource interface could get indexed as server endpoints
Status for workflow
|
} | ||
|
||
public interface UndangerousGoodsResource { | ||
// not even dangerous enough to get a resource method |
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.
😆
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.
Great work!
return typeName; | ||
} else if (type.kind() == Type.Kind.PARAMETERIZED_TYPE | ||
&& typeName.equals(DotName.createSimple(Class.class))) { | ||
// spec allows for Class<SubResource> to be returned that the container should instantiate |
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 didn't know that and don't think I've ever seen it used :)
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 was surprised, to say the least :)
Thanks for following up on this! |
This is a follow-up of quarkusio#46464. Given the purpose of the PR was to improve dev mode reload performance, I think it's worth avoid the extra allocations.
This makes sure, that the absent and present sub resources can actually be reached from a root resource class in the server endpoint indexer. Otherwise, e.g. client sub resource interface could get indexed as server endpoints.
I measured following times during hot reload.
With 2df8c69:
2df8c69 + this patch
improves hot reload times by about 80ms
related to #45631
replaces #46325