-
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
Duplicate quick fixes when shown at line #2236
Comments
Are there any other cases where 2 different types of problems/diagnostics with the same resolution can appear on the same line ? |
In my opinion there aren't any. |
I haven't had time to investigate it that much, but what I've found is that it occurs for variable declarations (fields and local variables), but not for parameter declarations: package com.example;
public class Foo {
List list = List.of(); // Duplicate quick fixes
public void bar(List list1, List list2) { // No duplicates
List list = List.of(); // Duplicate quick fixes
}
} |
I guess because the parameter declarations are the same type of problem ID, whereas the example below it are different problem IDs. |
@snjeza your build fixes the issue for me in both examples 👍 |
When
java.quickfix.showAt
is set toline
(the default), duplicate quick fixes are shown in certain scenarios.Environment
Steps To Reproduce
List
.Current Result
The actions in the quick fix menu are duplicated (if
java.quickfix.showAt
is set toline
).Expected Result
The actions in the quick fix menu are not duplicated even if
java.quickfix.showAt
is set toline
.Additional Information
The problem appears to be that quick fixes for both problem occurrences are shown at the same time when they occur at the same line. I cannot reproduce the issue when I put a newline after the
=
operator.The text was updated successfully, but these errors were encountered: