-
Bug
-
Resolution: Done
-
Major
-
5.0.2
-
None
The following code snippet is from the 5.0.2 STM Guide.
public class ExampleInteger implements Atomic { @WriteLock public int get () throws Exception { return state; } ... @ReadLock public void incr (int value) throws Exception { state += value; } private int state; }
The lock annotations on incr and get need to be swapped in order for the example to be correct.
A pull request is available.