-
Notifications
You must be signed in to change notification settings - Fork 192
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
Invalid warning about redundant specification of type arguments with anonymous inner classes #1358
Comments
Hmmm... it's strange. I don't get this error for the above simple case any more, but (at least in 4.8.0.v202210271251-e2206) I still get it on another project of mine... Trying to understand what's different... |
I was not able to reproduce with a simple test case. But there's a class in which I still have this problem, see here: The original problem I see is the second red row on the right, but, as you can see, even the simple |
Ok, I found the way to reproduce. The problem DOES NOT show up if the project uses a JavaSE-1.8 execution environment, but DOES show up if it uses a JavaSE-11 execution environment. I also tried with the very latest Greclipse (4.8.0.v202211132335-e2206). |
Seems to be fixed in 4.8.0.v202211201901-e2206, thank you! |
Ensure the following option is set to warning or above:
Right click on project => Properties | Java Compiler | Errors/Warnings | Enable project specific settings | Redundant type arguments (1.7 or higher), under Generic types.
Consider this:
Greclipse compiler shows a warning on
new ArrayList<String>
saying:However, if you change that line to:
this of course produces an error, because:
The text was updated successfully, but these errors were encountered: