-
Notifications
You must be signed in to change notification settings - Fork 13
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
Remove use of deprecated method and use the one in CF #438
Conversation
@wmdietl Please take a look at this PR. |
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.
Thanks for fixing this! Can you please update the javadoc for the method, as this PR is doing what that comment asks.
if (viewpointAdapter != null) { | ||
viewpointAdapter.viewpointAdaptConstructor(constructorReturnType, constructorElem, constructorType); | ||
} | ||
AnnotatedDeclaredType constructorReturnType = |
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.
Can you add some comments, e.g. why are we computing and annotating constructorReturnType
, even though it's not used later in the 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.
Updated!
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.
Why is this only necessary for the return type, not the parameter types? The old code also did something with the parameters.
Because other code is in the super call now.
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.
Which leaves the question why the supermethod isn't doing that... but okay, let's just do it only here.
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 leave a todo there for future clean up.
Sure, deleted the code javadoc |
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.
Thanks for fixing this up!
@@ -374,47 +376,21 @@ public Boolean visitDeclared(AnnotatedDeclaredType type, Void p) { | |||
} | |||
}; | |||
|
|||
/** | |||
* TODO: Similar but not the same as AnnotatedTypeFactory.constructorFromUse with space set aside from |
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.
Some comment about why this is overridden would still be good.
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.
Okay, updated!
Co-authored-by: Werner Dietl <[email protected]>
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.
Thanks, just one small cleanup.
@@ -70,6 +70,8 @@ | |||
import com.sun.source.tree.MethodInvocationTree; | |||
import com.sun.source.tree.NewClassTree; | |||
import com.sun.source.tree.Tree; | |||
import org.checkerframework.javacutil.TypesUtils; |
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.
These two imports seem unused. Can they be removed?
If they are needed, can you add them to the org.checkerframework...
section earlier in the file?
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.
Sure, removed. Sometimes we should add spotless to prevent un used import automatically.
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.
Yes, once we're done with the updates, we should get back to #430.
if (viewpointAdapter != null) { | ||
viewpointAdapter.viewpointAdaptConstructor(constructorReturnType, constructorElem, constructorType); | ||
} | ||
AnnotatedDeclaredType constructorReturnType = |
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.
Which leaves the question why the supermethod isn't doing that... but okay, let's just do it only here.
This PR will work on removing old API use and fixes deprecation warnings.