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.
Product Version = NetBeans IDE 8.1 (Build 201510222201) Operating System = Mac OS X version 10.11.3 running on x86_64 Java; VM; Vendor = 1.8.0_45 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.45-b02 Reproducibility: Happens every time STEPS: * Create a method as follows: public String marshal(Date input) { try { return input == null ? null : new SimpleDateFormat(format).format(input); } catch (Exception ex) { return input.toString(); } } ACTUAL: IDE complains about the return statement in the catch block. EXPECTED: Try block already ensures input can never be null beyond there so IDE should not complain
Correct; no sane Exception can be thrown in case input == null (Errors can be thrown, but not Exceptions). Requires quite precise control flow analysis