(note that this question is not about CAS, it\'s about the \"May fail spuriously\" Javadoc).
The only difference in the Javadoc between these two methods fr
Just to play a bit, if your question were
How can weakDoIt fail spuriously if it is implemented exactly like doIt?
here is the answer!
public void doIt() {
a();
}
/**
* May fail spuriously
*/
public void weakDoIt() {
a();
}
void a(){
if(Thread.currentThread().getStackTrace()[2].toString().contains("weakDoIt"))
System.out.println("I will fail spuriously!");
else System.out.println("I won't fail spuriously!");
}