[ 
https://issues.apache.org/jira/browse/NET-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586878#action_12586878
 ] 

Sebb commented on NET-213:
--------------------------

Reverted the code back to the way that 1.5 does it.

http://svn.apache.org/viewvc?rev=645995&view=rev

> 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.

Reply via email to