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

Summary: Do not highlight exceptions caught by previous catch clause
Product: java Reporter: fsttesla <fsttesla>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

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].