|
Re: Question on JCIP annotations: msg#00018java.jsr.166-concurrency
> Agreed - I realize it's a corner case and just wanted to ask for some > clarification (with an eye towards Findbugs). @ThreadSafe makes more sense > when @Immutable implies multiple objects. Also, bear in mind that a class with static methods only might still not be thread-safe if they have shared mutable state that is not properly synchronized. For example: @NotThreadSafe public class FooFactory { private static int fooCount; public static Foo newFoo() { ++fooCount; return new Foo(); } public static getFooCount() { return fooCount; } }
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Question on JCIP annotations, Holger Hoffstätte |
|---|---|
| Next by Date: | what to do about InterruptedException in ThreadPoolExecutor.awaitTermination, Alexandru Popescu |
| Previous by Thread: | Re: Question on JCIP annotations, Holger Hoffstätte |
| Next by Thread: | what to do about InterruptedException in ThreadPoolExecutor.awaitTermination, Alexandru Popescu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |