Skip to content
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

autocompletion inherided interface method insert wrong code #1593

Closed
zhangbaogithub opened this issue Aug 26, 2020 · 2 comments · Fixed by eclipse-jdtls/eclipse.jdt.ls#1537
Closed

Comments

@zhangbaogithub
Copy link

zhangbaogithub commented Aug 26, 2020

[provide a description of the issue]
autocompletion insert wrong code

Environment
  • Operating System: Windows_NT x64 10.0.18362
  • JDK version: 14.0.2
  • Visual Studio Code version: 1.48.1
  • Java extension version: 0.65.0
Steps To Reproduce
  1. [step 1] Passing anonymous interface in function parameters
  2. [step 2] Overwrite interface's abstract method

Current Result

overwrite onFailure method, it can associate onFailure but insert null

Expected Result

it can complete specified method correctly

@snjeza
Copy link
Contributor

snjeza commented Aug 26, 2020

I can't reproduce the issue.
@zhangbaogithub could you attach a sample project?

@zhangbaogithub
Copy link
Author

@snjeza yes, here is reproduce the issue steps:

  1. git clone https://github.com/square/okhttp.git
  2. git checkout parent-3.14.9
  3. open file(PostExample.java)
  4. add following code
client.newCall(request).enqueue(new Callback() {

});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants