s.i should fail in the program below because s is null.
class Foo {
static Foo s = null;
Foo i;
public static void main(String[] args) {
s.i.s = null;
}
}
            
class Foo {
static Foo s = null;
Foo i;
public static void main(String[] args) {
s.i.s = null;
}
}
- duplicates
- 
                    JDK-4453193 Bad bytecode when instance field access qualifies static access -           
- Closed
 
-         
- 
                    JDK-4640088 Volatile access incorrectly optimized away -           
- Closed
 
-         
- relates to
- 
                    JDK-4655091 REGRESSION: incorrect null pointer check in discarded subexpression -           
- Closed
 
-