mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
IDEA-107071 Incorrect "Condition '...' is always 'false'" inspection result
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
public class BrokenAlignment {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
Throwable error = null;
|
||||
try {
|
||||
doSomething();
|
||||
} catch (AssertionError e) {
|
||||
// rethrow error
|
||||
throw e;
|
||||
} catch (Throwable e) {
|
||||
// remember error
|
||||
error = e;
|
||||
}
|
||||
|
||||
if (error != null) { // <<--- inspection warning
|
||||
// handle error ...
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void doSomething() {
|
||||
throw new RuntimeException("dummy");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user