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 215875 - Wrong highlighting when the caret location is on the method return type and the method uses instanceof operator
Summary: Wrong highlighting when the caret location is on the method return type and t...
Status: RESOLVED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Janicek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-24 13:50 UTC by Martin Janicek
Modified: 2012-08-15 10:18 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 Martin Janicek 2012-07-24 13:50:41 UTC
In following method declaration:

public St|ring highlightProblem() {
    def val = ""
    if (val instanceof String) {
        return "";
    } else if (val instanceof BigInteger) {
        return "";
    }
}

..with caret location on the method return type. 

--> Expected: 2 highlights (method return type + String after the first use of instanceof operator)

--> Actual: 3 highlights are shown (the two described above + BigInteger is highlighted after the second use of the instanceof operator)
Comment 1 Martin Janicek 2012-08-15 10:18:51 UTC
Fixed together with issue 141332 in:
http://hg.netbeans.org/web-main/rev/090f8aa10763
http://hg.netbeans.org/web-main/rev/721dadc68bf9