JavaMemoryModel: Unsynchronized gettes

From: Doron Rajwan (doron@rajwan.org)
Date: Wed Apr 28 2004 - 07:16:58 EDT


Tiger beta1 libs has lots of unsynchronized gettes.

ByteArrayOutputStream, for example, has all update
methods synchronized, but all the getters, such as
size(), are not.

1. Is this a bug, or maybe this class was not suppose
to be thread-safe in the first place?

2. Does FindBugs check for this?

Doron.

=====
Doron Rajwan, mailto:doron@rajwan.org

-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:01:06 EDT