@State
@JCStressTest
public class M {
class A {
int f;
A() {
f = 42;
}
}
private A a;
@Actor
void actor1(){
a = new A();
}
@Actor
void actor2(IntResult1 r){
r.r1 = 1;
if(a != null){
r.r1 = a.f;
}
}
}
I tested it with a jcstress and I cannot get the output 0
. I know that is is not obvious that I should see that output, but it's possible and I would like to see it. Is there any JVM option (like XX:....
) to enforce it?