The class-level Javadoc examples in two files call Locks#lock(String), but that method does not exist on the Locks interface. The interface only declares exists(String) and get(String) (src/main/java/co/stateful/Locks.java:24,32), so the examples will not compile against the current API.
The offending snippets are in src/main/java/co/stateful/Atomic.java:31-33:
Lock lock = new RtSttc(new URN("urn:github:12345"), "token")
.locks().lock("test");
and in src/main/java/co/stateful/RtSttc.java:33-35:
Lock lock = new RtSttc(
new URN("urn:github:12345"), "token"
).locks().lock("test");
Both fail at .locks().lock("test") because RtSttc#locks() returns a Locks, and Locks exposes Lock get(String) to look up a lock by name.
Proposed fix: replace .locks().lock("test") with .locks().get("test") in both class-level Javadocs so the example matches the actual API.
The class-level Javadoc examples in two files call
Locks#lock(String), but that method does not exist on theLocksinterface. The interface only declaresexists(String)andget(String)(src/main/java/co/stateful/Locks.java:24,32), so the examples will not compile against the current API.The offending snippets are in
src/main/java/co/stateful/Atomic.java:31-33:and in
src/main/java/co/stateful/RtSttc.java:33-35:Both fail at
.locks().lock("test")becauseRtSttc#locks()returns aLocks, andLocksexposesLock get(String)to look up a lock by name.Proposed fix: replace
.locks().lock("test")with.locks().get("test")in both class-level Javadocs so the example matches the actual API.