Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 62191 invoked from network); 27 Feb 2011 02:53:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Feb 2011 02:53:20 -0000 Received: (qmail 52412 invoked by uid 500); 27 Feb 2011 02:53:20 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 52251 invoked by uid 500); 27 Feb 2011 02:53:19 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 52236 invoked by uid 99); 27 Feb 2011 02:53:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Feb 2011 02:53:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Feb 2011 02:53:18 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id CD1071B943A for ; Sun, 27 Feb 2011 02:52:58 +0000 (UTC) Date: Sun, 27 Feb 2011 02:52:58 +0000 (UTC) From: "Sebb (JIRA)" To: issues@commons.apache.org Message-ID: <995820358.613.1298775178836.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <252272304.7221.1298339918452.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Updated: (NET-359) CopyStreamAdapter unconditionally resets the CopyStreamEvent source and is inefficient MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/NET-359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sebb updated NET-359: --------------------- Fix Version/s: 3.0 > CopyStreamAdapter unconditionally resets the CopyStreamEvent source and is inefficient > -------------------------------------------------------------------------------------- > > Key: NET-359 > URL: https://issues.apache.org/jira/browse/NET-359 > Project: Commons Net > Issue Type: Bug > Reporter: Sebb > Fix For: 3.0 > > > The CopyStreamAdapter.bytesTransferred(CopyStreamEvent event) method unpacks the event in order to pass the parameters to bytesTransferred(long, int, long) method which creates a new event and propagates it to the listeners. > This means that the original event source is lost, and there is an unnecessary event creation. > It seems wrong for the bytesTransferred(long, int, long) method to create a CopyStreamEvent - the interface Javadoc specifically says that the bytesTransferred(long, int, long) method was added to avoid the need to create the event. > It would make more sense if the adapter handled the methods independently, i.e. if the caller provides an event, pass that on, otherwise pass on the individual parameters to the listeners. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira