commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Created] (NET-551) Util copyReader calls CopyStreamListener.bytesTransferred with the incorrect value for bytesTransferred
Date Thu, 07 Aug 2014 19:31:12 GMT
Sebb created NET-551:
------------------------

             Summary: Util copyReader calls CopyStreamListener.bytesTransferred with the incorrect
value for bytesTransferred
                 Key: NET-551
                 URL: https://issues.apache.org/jira/browse/NET-551
             Project: Commons Net
          Issue Type: Bug
    Affects Versions: 3.3
            Reporter: Sebb


Util copyReader calls CopyStreamListener.bytesTransferred with the incorrect value for bytesTransferred
parameter if it reads a single character.

It uses the value of the field chars which at that point contains the character, rather than
the number read.

The code also re-uses the chars field for both the number of characters read and the single
character, which is quite confusing. [The copyStream also re-uses the bytes field, but uses
the correct bytesTransferred parameter]



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message