mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-22 06:20:54 +07:00
30 lines
461 B
Plaintext
30 lines
461 B
Plaintext
class Main {
|
|
|
|
private int sideEffectCounter;
|
|
|
|
|
|
public Main() {
|
|
|
|
this.sideEffectCounter = 1;
|
|
}
|
|
|
|
private Object checkNullnessAndGet(Object obj) {
|
|
return obj == null ? fooBar() : null;
|
|
}
|
|
|
|
private Object fooBar() {
|
|
sideEffectCounter++;
|
|
return null;
|
|
}
|
|
|
|
public final void doSomething(Object obj) {
|
|
try {
|
|
if (null == null) {
|
|
fooBar();
|
|
}
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
} |