-
Bug
-
Resolution: Fixed
-
P4
-
6
-
b29
-
generic
-
generic
Bill Pugh writes:
M IS2: Inconsistent synchronization of
java.io.ByteArrayOutputStream.buf; locked 80% of time
Unsynchronized access at ByteArrayOutputStream.java:[lines 160, 174 and
200]
The methods that convert a ByteArrayOutputStream to a String (all the
toString) methods
are not thread safe. In particular, since they access both the buf
field and the count
field and don't use locks, you could get stale data or an array access
out of bounds
error. The toString methods for ByteArrayOutputStream should be made
synchronized.
###@###.### 2005-2-14 08:13:16 GMT
M IS2: Inconsistent synchronization of
java.io.ByteArrayOutputStream.buf; locked 80% of time
Unsynchronized access at ByteArrayOutputStream.java:[lines 160, 174 and
200]
The methods that convert a ByteArrayOutputStream to a String (all the
toString) methods
are not thread safe. In particular, since they access both the buf
field and the count
field and don't use locks, you could get stale data or an array access
out of bounds
error. The toString methods for ByteArrayOutputStream should be made
synchronized.
###@###.### 2005-2-14 08:13:16 GMT