On 18/03/2009, Mike Dillon <[email protected]> wrote: > begin sebb quotation: > > > It didn't work when I tried it last. Admittedly that was a few months > > ago, and there has just been a new release. But I just tried again > > with the following code: > > > > import net.jcip.annotations.GuardedBy; > > public class GuardedByTest { > > @GuardedBy("this") > > public int count; > > public synchronized void incCount(){ > > count++; > > } > > public int getCount(){ > > return count; > > } > > } > > > > Which I would have expected to report some problems. I even tried > > @GuardedBy("that") which IMO should also have triggered a warning. > > > > This was using the Eclipse plugin, 1.3.8.20090315. > > > > But perhaps I've missed something. > > > I agree this should trigger a warning. I've forwarded your message to > the Findbugs folks to find out what the deal is. >
Thanks. I tried one of the findbugs project annotations from near the top of the page, and it worked OK. It might be nice to use some of those, but it looks like the licence is LGPL so we can't have a non-optional dependency on the jar. [I also tried using the javax version of GuardedBy, but that did not help] > -md > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
