-
Notifications
You must be signed in to change notification settings - Fork 414
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
extract method does not seem to like var nor method references #1956
extract method does not seem to like var nor method references #1956
Comments
looks like your example is missing some steps. The ghContents line magically appeared in step 2 |
for the var its easy to reproduce btw: var test = new String("blah");
test = test + test; extract method creates you: private String extracted(var test) {
return test + test;
} |
ok. Not reproducible in Eclipse (which adds an intermediary step to list the variables and their type). So definitely.an issue in jdt.ls. |
#1780 fixes the issue with the var
This is an upstream issue.
try to extract
Result (with the PR):
The issue is also reproducible on Eclipse. |
did you open/find a upstream eclipse bug? |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=535638 They resolved it a while back, which makes our changes a bit easier to do. We inherited the helper methods (from shared components), but just didn't have the one-line changes to use them (since the refactorings themselves are in ui components) |
gets refactored into this:
notice how
gson
is of typevar
where it should begson
and neitheraliasItems
nortemplateItems
are present in the method declaration despite them being referenced.The text was updated successfully, but these errors were encountered: