Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The constructors in FromNetASCIIInputStream.java assign a value to a static field:
_lineSeparatorBytes = _lineSeparator.getBytes(encoding);
This is not thread-safe, indeed it is thread-hostile if the value can ever be different for different encodings.
(Two different instances wanting to use two different values of the same static field)
The field should be initialised in the static initialiser (and should probably be made final as a hint not to change it - though this won't stop the contents being changed).