You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2008/04/08 18:37:24 UTC

[jira] Updated: (NET-213) Unsafe code in FromNetASCIIInputStream.java

     [ https://issues.apache.org/jira/browse/NET-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated NET-213:
---------------------

    Fix Version/s:     (was: 1.5)

Does not apply to 1.5

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