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.
[dev build 050705] 1. Have this code: InputStream s = new FileInputStream("foo"); s.read(); new URL("foo"); 2. Use Surround with Try-Catch. You get: try { InputStream s = new FileInputStream("foo"); s.read(); new URL("foo"); } catch (FileNotFoundException e) { } catch (IOException e) { } catch (MalformedURLException e) { } The last catch is an error, since MalformedURLException extends IOException, so MUE is being catched by the catch of IE. Catch statements for classes lower in the inheritance chain should be generated first. So here it should be: try { InputStream s = new FileInputStream("foo"); s.read(); new URL("foo"); } catch (FileNotFoundException e) { } catch (MalformedURLException e) { } catch (IOException e) { }
I will look at it.
Fixed in trunk. Checking in org/netbeans/modules/javacore/TryWrapper.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/TryWrapper.java,v <-- TryWrapper.java new revision: 1.11; previous revision: 1.10 done
Verified.
Reorganization of java component