Ernie Rael created NETBEANS-4356: ------------------------------------ Summary: Unneeded/redundant cast added by code completion Key: NETBEANS-4356 URL: https://issues.apache.org/jira/browse/NETBEANS-4356 Project: NetBeans Issue Type: Bug Components: editor - Completion & Templates Affects Versions: 12.0 Environment: Product Version: Apache NetBeans IDE 12.0-beta4 Updates: Updates available to version NetBeans 8.2 Patch 2 Java: 14.0.1; Java HotSpot(TM) 64-Bit Server VM 14.0.1+7 Runtime: Java(TM) SE Runtime Environment 14.0.1+7 System: Windows 7 version 6.1 running on amd64; UTF-8; en_US (nb) Reporter: Ernie Rael
Consider the code, caret shown as '|', {code:java} static private void xxx(ViMark m) { if(m instanceof Filemark) { if(m.getb|) } } {code} Bring up code completion, it show info for Filemark, not ViMark; that could be handy in some cases. BTW, ViMark is an interface. Select method getBuffer() and the result is {code:java} if(((Filemark)m).getBuffer()) {code} ViMark has a getBuffer method, the cast is bogus. The project is marked 1.8 source. I tried it after removing cachedir, still failed. A simple test case works. I'll try to get a smaller case. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists