blob: ecb9b264bb6246c468659dfd6059bf3829c95c00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
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");
}
}
|