-
Notifications
You must be signed in to change notification settings - Fork 330
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
Extracting raw type before creating BeanClass #837
Conversation
Please, provide some information about your pull request, and the motivation/goal/(or problem caused) for this. Because we need to understand the goal for each pull request to make sure this change wont break anything. And, please, provide some test case if possible. Thank you. |
Sorry @garcia-jj , i forgot i just said to @Turini |
sorry, but my english is terrible |
Hmm, ok, but next time you send a pull request, please, provide some description about the pull request. This is very important to allow us to understand the real problem, help and review your code, and to make sure the changes don't break anything. Did you test your change before commit? Take a look in the line 40. You extract the proxy class, but you don't assign to anything. That means: does nothing. I'm not sure if its the right place to do this check, because this method is used to create internal instance. I think the best choice is create a method getAnnotations/getAnnotation/isAnnotationPresent to get class annotations. |
@@ -35,6 +37,7 @@ public DefaultControllerMethod(BeanClass controller, Method method) { | |||
} | |||
|
|||
public static ControllerMethod instanceFor(Class<?> type, Method method) { | |||
CDIProxies.extractRawTypeIfPossible(type); |
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.
Use tabs
instead of spaces
.
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 don't test yet
I will finish it tomorow
Don't merge yet
Em segunda-feira, 13 de outubro de 2014, Otávio Garcia <
[email protected]> escreveu:
In
vraptor-core/src/main/java/br/com/caelum/vraptor/controller/DefaultControllerMethod.java:@@ -35,6 +37,7 @@ public DefaultControllerMethod(BeanClass controller, Method method) {
}public static ControllerMethod instanceFor(Class<?> type, Method method) {
CDIProxies.extractRawTypeIfPossible(type);
Use tabs instead of spaces.
—
Reply to this email directly or view it on GitHub
https://github.com/caelum/vraptor4/pull/837/files#r18797113.
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 think you forgot to assign the result of the method call, Felipe. You
should do something like:
type = CDIProxies.extractEtcEtc(type);
Chico Sokol
On Mon, Oct 13, 2014 at 7:36 PM, Felipe Oliveira [email protected]
wrote:
In
vraptor-core/src/main/java/br/com/caelum/vraptor/controller/DefaultControllerMethod.java:@@ -35,6 +37,7 @@ public DefaultControllerMethod(BeanClass controller, Method method) {
}public static ControllerMethod instanceFor(Class<?> type, Method method) {
CDIProxies.extractRawTypeIfPossible(type);
I don't test yet I will finish it tomorow Don't merge yet Em
segunda-feira, 13 de outubro de 2014, Otávio Garcia <
[email protected]> escreveu:
… <#1490ba774297fa3d_>
In
vraptor-core/src/main/java/br/com/caelum/vraptor/controller/DefaultControllerMethod.java:@@ -35,6 +37,7 @@ public DefaultControllerMethod(BeanClass controller,
Method method) { > } > > public static ControllerMethod
instanceFor(Class<?> type, Method method) { > +
CDIProxies.extractRawTypeIfPossible(type); Use tabs instead of spaces. —
Reply to this email directly or view it on GitHub <
https://github.com/caelum/vraptor4/pull/837/files#r18797113>.—
Reply to this email directly or view it on GitHub
https://github.com/caelum/vraptor4/pull/837/files#r18799361.
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'll finish it with @felipeweb today.
After testing on a real app we'll merge here.
With this change we avoid the need to check if any downside for this change? |
PR #733 have introduced a bug causing stackoverflow. So we need to test in real apps before merge. Have you tested in guj or other app? Tonight I can do some tests in my apps. |
yes, we've tested on @felipeweb's app (real app) |
@@ -35,6 +37,7 @@ public DefaultControllerMethod(BeanClass controller, Method method) { | |||
} | |||
|
|||
public static ControllerMethod instanceFor(Class<?> type, Method method) { | |||
type = CDIProxies.extractRawTypeIfPossible(type); |
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.
Fix indentation (tabs instead spaces). And may you can use static import here.
Done! i remove space to tabs |
Extracting raw type before creating BeanClass
Thanks @felipeweb |
No description provided.