Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 84054 invoked from network); 10 Feb 2006 15:21:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Feb 2006 15:21:48 -0000 Received: (qmail 57133 invoked by uid 500); 10 Feb 2006 15:21:44 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 57065 invoked by uid 500); 10 Feb 2006 15:21:43 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 57046 invoked by uid 99); 10 Feb 2006 15:21:43 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2006 07:21:43 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [203.16.214.203] (HELO smtp3.adl2.internode.on.net) (203.16.214.203) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2006 07:21:42 -0800 Received: from [192.168.1.2] (ppp115-156.static.internode.on.net [150.101.115.156]) by smtp3.adl2.internode.on.net (8.13.5/8.13.5) with ESMTP id k1AFLHcj011914 for ; Sat, 11 Feb 2006 01:51:19 +1030 (CST) (envelope-from sjr@jdns.org) From: James Ring To: commons-dev@jakarta.apache.org Subject: [cli] HelpFormatter.pad(String, int, Writer) in cli2 Date: Sat, 11 Feb 2006 02:21:12 +1100 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1980072.UWtQ76ivD2"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200602110221.17337.sjr@jdns.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --nextPart1980072.UWtQ76ivD2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi all, I was thinking that protected static void pad(final String text, final int width, final Writer writer) throws IOException would read better as protected static void pad(final String text, final int width, final PrintWriter writer) for the following reason: pad() has protected access in HelpWriter. All non-JUnit callers pass a=20 PrintWriter to pad() anyway, which does not throw IOException in its write(= )=20 method. So, the upshot is that pad() no longer has to throw IOException. In fact, I think there would be no need for IOExceptions to be thrown by=20 HelpWriter at all. If callers want to know if an error occurs inside=20 HelpWriter, they can call getPrintWriter().checkErrors().=20 What do people think? Thanks! Regards, James =2D-=20 James Ring --nextPart1980072.UWtQ76ivD2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBD7K9t8iUSK0BWyO4RAiFxAJ95Nlr2m3T1epaV0M+kg9xAVC+VHQCfeEax W3TCv1GJf05rS7CJG1tMiBs= =wvEi -----END PGP SIGNATURE----- --nextPart1980072.UWtQ76ivD2--