Br Tr created NETBEANS-4231:
-------------------------------
Summary: Compilation errors on wrong referenced method signature
not shown in java code editor
Key: NETBEANS-4231
URL: https://issues.apache.org/jira/browse/NETBEANS-4231
Project: NetBeans
Issue Type: Bug
Components: java - Editor
Affects Versions: 11.3
Environment: Windows 10, netbeans runs on Amazon Corretto JDK 11.
Reporter: Br Tr
Such errors as in the code below (a reference to the 'wrongMethod' - when the
signature does not match) are not shown (not underlined in red with an error
description on hovering cursor over it) in the java code editor. This is a
compilation error that's not shown. You can see it in the 'Acion Items'
window/pane though - it's the only place you can check what is wrong with the
code (without compiling the project and looking at the compiler output).
Build systems checked for the issue - Gradle, Maven.
This issue slows down working with method references - an error is not visible
as soon as it can be seen.
{code:java}
package some.package;
import java.util.HashMap;
import java.util.Map;
public class NetbeansError {
@FunctionalInterface
public static interface FunctionalInterfaceToUse {
void doSomething(String whatSomething);
}
private final Map<String, FunctionalInterfaceToUse> methodReferences = new
HashMap<>();
public NetbeansError() {
methodReferences.put("correctReferenceKey", this::correctMethod);
methodReferences.put("wrongReferenceKey", this::wrongMethod);// This line
should be underlined in red with error description visible in the editor
tooltip like other compilation errors
}
public void wrongMethod(Integer aStringParameterThatIsCorrect) {
}
public void correctMethod(String aStringParameterThatIsCorrect) {
}
}
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists