I have the following code:
import net.jcip.annotations.GuardedBy; import net.jcip.annotations.ThreadSafe; @ThreadSafe public class Aoeu { @GuardedBy("this") private long aoeu; public long getAoeu() { return aoeu; } public void setAoeu(long aoeu) { this.aoeu = aoeu; } }
From what I read, FindBugs understands JCiP annotations (indeed, ship 1.3.9 comes with them), but I do not receive any warnings from the above code. According to, I expect to see:
IS: Field not guarded against concurrent access (IS_FIELD_NOT_GUARDED) This field is annotated with net.jcip.annotations.GuardedBy, but can be accessed in a way that seems to violate the annotation.
source share