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.
The description for the "Throwable method result is ignored" hint indicates we should be storing the returned Throwable in order to "save time for Throwable's stacktrace creation." It seems you want to reduce the number of times Throwable.fillInStackTrace() gets invoked, but I think the condition you are checking for (methods returning Throwable) is way too broad to be useful. This results in many false positives. For example: SQLException current = result; while (current.getNextException() != null) { chainedExceptions.add(current); current = current.getNextException(); } In the above case, current.getNextException() triggers the warning but it is not actually invoking fillInStackTrace() per call. The stacktrace has already been generated a long time ago. Consider changing the condition that triggers this hint, or removing the hint altogether.
The main value of the hint is to point out to possible unhandled exception conditions, the performance is just a side effect. The hint should not trigger in the presented case, as the Throwable from current.getNextException() is used in null comparison.
Uh-oh ... usage in loop control condition was not detected as valid usage. Fixed as jet-main#8fe23bcf31e3
Integrated into 'main-silver', will be available in build *201508110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/8fe23bcf31e3 User: Svata Dedic <sdedic@netbeans.org> Log: #247933: loop control conditions properly handled