This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 246727 - Incorrect recognition of typed interface cast
Summary: Incorrect recognition of typed interface cast
Status: RESOLVED DUPLICATE of bug 246700
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Windows 7 x64
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-27 10:59 UTC by hw_mm
Modified: 2014-08-29 09:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hw_mm 2014-08-27 10:59:19 UTC
The development version 201408270001 does not correctly recognise a cast to an interface with type parameters.

Simple example (formatting from netbeans!):
    public Attribute<Object, ? extends Object> getSomething() {
        return ((Attribute < Object,  ? extends Object >


    )) null;
    }
The return line complains with the message "incompatible types: Attribute is not a functional interface"
and "multiple non-overriding abstract methods found in interface Attribute"
and "')' expected"

Maven has no problems (and Netbeans 8.0 did not complain either)

Attribute is the class javax.persistence.metamodel.Attribute with two type parameters.
Comment 1 hw_mm 2014-08-27 11:05:02 UTC
Sorry, the example above contains an error: There must not be two parentheses for the cast of course...
Comment 2 Dusan Balek 2014-08-29 09:38:29 UTC
Already fixed in the current dev build.

*** This bug has been marked as a duplicate of bug 246700 ***