summaryrefslogtreecommitdiff
path: root/java/java-tests/testData/inspection/dataFlow/fixture/FinalFieldDuringSuperInitialization.java
blob: 59fc5fba349ae888fff88f358a2d36913eca7106 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class Parent {
  Parent() {
    callProtectedMethod();
  }
  protected void callProtectedMethod() { }
}

class Child extends Parent {
  private final Object myField;
  Child() {
    super();
    myField = new Object();
  }
  @Override
  protected void callProtectedMethod() {
    if (myField != null) {  // HERE myField CAN be null
      System.out.println();
    }
  }
}