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.
Summary: | Adding try/catch block can mangle or remove code | ||
---|---|---|---|
Product: | java | Reporter: | tomwheeler <tomwheeler> |
Component: | Unsupported | Assignee: | issues@java <issues> |
Status: | RESOLVED DUPLICATE | ||
Severity: | blocker | ||
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
tomwheeler
2007-03-26 16:50:34 UTC
It's duplicate of issue 92317. Thanks for your report. *** This issue has been marked as a duplicate of 92317 *** Node node = (Node) activatedNodes[0].getLookup().lookup(Object.class); Lookup theLookup = node.getLookup(); System.out.println("Dumping Lookup..."); InstanceCookie ic = (InstanceCookie) theLookup.lookup(InstanceCookie.class); if (DogBean.class.equals(ic.instanceClass())) { DogBean dog1 = (DogBean) ic.instanceCreate(); System.out.println(" Dog Name => " + dog1.getName()); } -> void m() { try { Node[] activatedNodes = null; Node node = (Node) activatedNodes[0].getLookup().lookup(Object.class); Lookup theLookup = node.getLookup(); System.out.println("Dumping Lookup..."); InstanceCookie ic = theLookup.lookup(InstanceCookie.class); if (DogBean.class.equals(ic.instanceClass())) { DogBean dog1 = (DogBean) ic.instanceCreate(); System.out.println(" Dog Name => " + dog1.getName()); } } catch (IOException ex) { Exceptions.printStackTrace(ex); } catch (ClassNotFoundException ex) { Exceptions.printStackTrace(ex); } } Array is duplicated, but it is another problem, will be reported separately. |