-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Add MvcMethod object for setMvcMethod
and getMvcMethod
.
#3532
Comments
The other advantage to this is if one actually did want to call the method they can use the more modern and in theory faster |
We can probably add it, but either this way or just enabling the option in jooby-apt will require you to update all your projects, no? |
Correct. The code change is minor as that is one place but the compiler flag is not because of Maven limitations. I’m proposing it because it is the right thing to do. We should not kick off reflection on initialization. |
Ok, send a PR so we can release 3.4.0 with the change |
@jknack This probably a silly question but I assume we are still targeting jDK 17 for 3.4.0 correct? I'm fairly sure but just want to check. |
absolutely. jooby 4.0 will be 21 |
The apt option will be off by default in next major release: 4.0 regardless of how we model this object |
Sorry @jknack I ran out of time. Can we shoot to add this for 3.5.0? |
Never mind I see you already put it in. Thanks for implementing and I'm sorry I wasn't much help on it. I had some other work and I was trying to make a window for this and #3498 so that I was full jooby focus. Thanks for putting it in! |
Currently
setMvcMethod
andgetMvcMethod
are ajava.lang.reflect.Method
.The original impetus for
set/getMvcMethod
was for metrics and the actualjava.lang.reflect.Method
is not even needed but rather method name and signature.I propose based on this comment: #3529 (comment)
That we replace get/setMvcMethod(io.jooby.MvcMethod method).
MvcMethod
type would have enough metadata so that one could get thejava.lang.reflect.Method
dynamically if desired.This will avoid reflective lookup during registration regardless of whether nor
setMvcMethod
is enabled or not.I can do a PR for this for 3.4.0 depending on timeline of 3.4.0
The text was updated successfully, but these errors were encountered: