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 242212 is still present in version 8.0.2 Product Version = NetBeans IDE 8.0.2 (Build 201411181905) Operating System = Mac OS X version 10.10.2 running on x86_64 Java; VM; Vendor = 1.7.0_67 Runtime = Java HotSpot(TM) 64-Bit Server VM 24.65-b04 try { // ... throw new OrmException("example"); } catch (OrmException maybeSqlTransactionRollbackException) { Throwable cause = maybeSqlTransactionRollbackException.getCause(); // <--- Erroneous hint here if (ChangesOnSlave.retryOnDeadlocks && (cause instanceof SQLTransactionRollbackException)) { // ... } else { throw maybeSqlTransactionRollbackException; } } NetBeans will still say that the cause is ignored even if it's used in the following if.
reproducible
Complex conditions involving the throwable var were not handled correctly. Fixed in jet-main#0238036e9b54
Integrated into 'main-silver', will be available in build *201505230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/0238036e9b54 User: Svata Dedic <sdedic@netbeans.org> Log: #251944: accept Throwable use in complex conditions