Yes -- well, not a "random" Object, but an Object used purely for its built-in lock -- and then the type of incr could be plain int.
--tim On Tue, Sep 30, 2008 at 10:04 PM, Rob Heittman <[EMAIL PROTECTED]>wrote: > Right. So if it was desirable to do so (for example, if I was doing > something more complicated than counting) I could have declared a random > Object lockObject and the block would be functional, at least. > /threadjack > > - R > > On Tue, Sep 30, 2008 at 8:30 PM, Tim Peierls <[EMAIL PROTECTED]> wrote: > >> In this case, though, the value of the field incr is changing, so it is >> not suitable as the argument of @GuardedBy. >> > >

