Don created NETBEANS-4020:
-----------------------------
Summary: incorrect error on type conversion during list extraction
Key: NETBEANS-4020
URL: https://issues.apache.org/jira/browse/NETBEANS-4020
Project: NetBeans
Issue Type: Bug
Components: java - Compiler
Affects Versions: 11.3
Environment: Mac OS Catalina, Netbeans 11.3
Reporter: Don
The following code has an error reported in the editor, but in fact is not an
error.
Example:
*{color:#00875a}abstract public class CmnStrc {{color}*
*{color:#00875a}public ArrayList<HotspotDilg> refHsDilgs = new ArrayList<>
();{color}*
*{color:#00875a}}{color}*
*{color:#00875a}public class DiagModel {{color}*
*{color:#00875a}HotspotDilg hsDilg = cmnStrc.tgtHsDilg;{color}*
*{color:#00875a}for ( int hsDilgNdx = 0 ; hsDilgNdx <
cmnStrc.refHsDilgs.size () ; hsDilgNdx++ ) {{color}*
*{color:#00875a}+hsDilg = cmnStrc.refHsDilgs.get ( hsDilgNdx );+{color}*
*{color:#00875a}}{color}*
*{color:#00875a}}{color}*
To remove the error in the error:
{color:#de350b} *+hsDilg = (HotspotDilg) cmnStrc.refHsDilgs.get (
hsDilgNdx );+*{color}
This wasn't/isn't really necessary, except to remove the editor error. The code
compiles fine without any error indication.
This error cropped up today, after making a few other changes to unrelated
code. The error indication in the editor wasn't there earlier today when making
other unrelated changes. Other "incompatible type" errors are cropping up - one
at a time in separate files as I make changes to remove these "non-errors".
Indicates the IDE is highly unstable and may have other problems not directly
related to this error, like perhaps memory leaks or accessing unrelated
elements of the IDE (just a guess of course).
--
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