IDEA-107071 Incorrect "Condition '...' is always 'false'" inspection result

This commit is contained in:
peter
2013-06-24 18:24:31 +02:00
parent 593eeaf1e4
commit 9d1f0d801e
3 changed files with 27 additions and 1 deletions
@@ -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");
}
}