[
https://issues.apache.org/jira/browse/NET-551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sebb resolved NET-551.
----------------------
Resolution: Fixed
Fix Version/s: 3.4
URL: http://svn.apache.org/r1616574
Log:
NET-551 Util copyReader calls CopyStreamListener.bytesTransferred with the
incorrect value for bytesTransferred
Added:
commons/proper/net/trunk/src/test/java/org/apache/commons/net/util/UtilTest.java
Modified:
commons/proper/net/trunk/src/changes/changes.xml
commons/proper/net/trunk/src/main/java/org/apache/commons/net/io/Util.java
URL: http://svn.apache.org/r1616578
Log:
NET-551 Util copyReader calls CopyStreamListener.bytesTransferred with the
incorrect value for bytesTransferred
Rename confusing fields
Modified:
commons/proper/net/trunk/src/main/java/org/apache/commons/net/io/Util.java
> 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
> Fix For: 3.4
>
>
> 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)