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 243842 - Do not highlight exceptions caught by previous catch clause
Summary: Do not highlight exceptions caught by previous catch clause
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-15 09:08 UTC by fsttesla
Modified: 2014-04-15 09:26 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fsttesla 2014-04-15 09:08:25 UTC
Consider the following Java snippet:
try {
    URL url = new URL("http://www.example.com"); // [1]
    URLConnection conn = url.openConnection(); // [2]
    // etc.
} catch (MalformedURLException mue) {
    // handle mue
} catch (IOException ioe) { // [3]
    // handle ioe
}
Enable highlighting of Exception Throwing Points (Options > Editor > Highlighting).
If I put the caret over IOException in line [3], both "new URL(...)" in line [1] and "url.openConnection()" in line [2] get highlighted. I think that only [2] should be highlighted, because there exists a previous catch clause that catches the exception thrown by [1].