Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 54455 invoked from network); 15 Apr 2011 17:11:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Apr 2011 17:11:40 -0000 Received: (qmail 78614 invoked by uid 500); 15 Apr 2011 17:11:40 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 78538 invoked by uid 500); 15 Apr 2011 17:11:40 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 78530 invoked by uid 99); 15 Apr 2011 17:11:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Apr 2011 17:11:40 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of garydgregory@gmail.com designates 209.85.215.171 as permitted sender) Received: from [209.85.215.171] (HELO mail-ey0-f171.google.com) (209.85.215.171) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Apr 2011 17:11:32 +0000 Received: by eydd26 with SMTP id d26so1348437eyd.30 for ; Fri, 15 Apr 2011 10:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:references:from:in-reply-to:mime-version:date :message-id:subject:to:content-type; bh=KWC/+g2H/FheYJLdBeeCkg/fA/T+mqNklBbgWQqeRDQ=; b=GandQtYqgkyGkkUTHEKcPwcHJdl88ZXoxIdhqj2iTiEdh4Om4tyyvA1cn94+Sw8PF2 UgYD6ElWSUQKn2PjuflpRgZRZeDpVZY7RFKJ+yIuCASBAqFgmyaSy6LJtWGvvX5z9mah b7SFzUTRETrqW+BWLuGQXkAJA8X/OFgAcCk7w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:from:in-reply-to:mime-version:date:message-id:subject:to :content-type; b=hAVrp2hu87CtWvNALQcGhEHxm0cdcIH68UFx8Zz87/mqAB5fe+O1/GEBE/qUv/L22a yi/MMs8m94iAlpppLmm2+eRUnlsxpx278Mz4g/6znVbdPaf8Otr5FasEJoNfKfZyVBqK ag0WYxY7WPbgNFdLLrSXvrjoq5414aBotFhBY= Received: by 10.213.31.73 with SMTP id x9mr3183983ebc.116.1302887471606; Fri, 15 Apr 2011 10:11:11 -0700 (PDT) References: <201104151448.p3FEmuOS005381@aragorn.savarese.org> From: Gary Gregory In-Reply-To: <201104151448.p3FEmuOS005381@aragorn.savarese.org> Mime-Version: 1.0 (iPhone Mail 8H7) Date: Fri, 15 Apr 2011 13:11:08 -0400 Message-ID: <-2240415941472220542@unknownmsgid> Subject: Re: [net] binary compatibility be damned To: Commons Developers List Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org If your are going to break binary compatibility then a major release is the time to do it. Is there any question that the design is wrong? Gary On Apr 15, 2011, at 10:49, "Daniel F. Savarese" wrote: > > Prior to the 3.0 release, I'm trying to review recent code changes and > test the code in what little spare time I have available. I noticed that > ProtocolCommandSupport __commandSupport was moved into SocketClient. > I disagree with this change. SocketClient isn't meant to serve only > Commons Net classes, nor is it meant only for implementing clients for > IETF protocols; and only a limited number of clients actually need > to use ProtocolCommandSupport. Having a private member variable that is > initially null that must be initialized outside of the base class via calling > createCommandSupport to initialize is fragile. That's what constructors > are for. Even though Java doesn't have destructors, avoiding initialization > protocols and using RAII is still a good rule of thumb for resource creation. > > A more robust and flexible separation of concerns would place the > ProtocolCommandSupport member in a ProtocolClient abstract class that > subclasses SocketClient and initializes __commandSupport (which should > be protected, not private, obviating the need for getCommandSupport()) > in its constructor. Then the protocol clients that require > ProtocolCommandSupport can be changed to subclass ProtocolCommandSupport. > That won't break compilation of any user code, but breaks binary compatibility. > Emphasizing binary compatibility at the expense of design doesn't make sense > to me. Commons Net is enough of a Rube-Goldberg machine as it is. > > Is there some overriding reason why binary compatibility absolutely must > be maintained or may I open an issue and make the above change? > > daniel > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org