[
https://issues.apache.org/jira/browse/NET-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sebb resolved NET-213.
----------------------
Resolution: Fixed
> Unsafe code in FromNetASCIIInputStream.java
> -------------------------------------------
>
> Key: NET-213
> URL: https://issues.apache.org/jira/browse/NET-213
> Project: Commons Net
> Issue Type: Bug
> Reporter: Sebb
> Fix For: 2.0
>
>
> 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).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.