In NetBeans 11.3 with Java 14, I have noticed many cases of error dialogs 
popping up while editing source code. Usually the source code is in a 
temporarily incorrect state--but the editor should be able to handle this 
gracefully. Some of the errors are assertion errors at the com.sun.tools.javac 
level. I don't know this part of the IDE codebase very well, so I'm not sure 
whether these problems are caused by nbjavac (which I do have installed), the 
Java 14 javac, or in some cases higher-level NetBeans editor highlighting code.

Here are four examples of such errors:
https://issues.apache.org/jira/browse/NETBEANS-4095 (NPE inside javac)
https://issues.apache.org/jira/browse/NETBEANS-4177 (IOOBE at the NetBeans 
SemanticHighlighterBase level)
https://issues.apache.org/jira/browse/NETBEANS-4179 (AssertionError inside 
javac/FlowAnalyser)
https://issues.apache.org/jira/browse/NETBEANS-4180 (AssertionError inside 
javac/Analyzer)

In many cases I expect the user experience could be improved by simply 
suppressing the errors. Though ideally the editor should be able to skip the 
syntax errors and parse the correct portions of the file. And NPEs and 
AssertionErrors inside javac should ideally be fixed there, even when parsing 
temporarily incorrect source files.

-- Eirik

Reply via email to