There seems to be a problem with multi catch:
public void test() throws ArrayIndexOutOfBoundsException, UnsupportedOperationException { } Exception exception = null; protected void a() { try { test(); } catch (ArrayIndexOutOfBoundsException | UnsupportedOperationException ex) { exception = ex; } } protected void b(int state) { if (exception != null) { if (exception instanceof ArrayIndexOutOfBoundsException) { // ok return; } else if (exception instanceof UnsupportedOperationException) { // marked as error return; } } }
OK, thanks for reporting this.
Actually there are two false positives, see
https://code.google.com/p/findbugs/source/detail?r=0edf54656b66e9be9f76e94fedd8a561a948efcb
Regards,
Andrey
fixed. Thanks.