Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E9A65EE0F for ; Sun, 17 Mar 2013 13:32:36 +0000 (UTC) Received: (qmail 69185 invoked by uid 500); 17 Mar 2013 13:32:34 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 69060 invoked by uid 500); 17 Mar 2013 13:32:34 -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 69042 invoked by uid 99); 17 Mar 2013 13:32:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Mar 2013 13:32:33 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sebbaz@gmail.com designates 74.125.82.177 as permitted sender) Received: from [74.125.82.177] (HELO mail-we0-f177.google.com) (74.125.82.177) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Mar 2013 13:32:28 +0000 Received: by mail-we0-f177.google.com with SMTP id d7so4098630wer.36 for ; Sun, 17 Mar 2013 06:32:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=WcThgB40oKf0P9k641TeC2TuHRtNmYLPXJsMplzunlQ=; b=shgVPj8ZvpMoFK/Ypo2tiKNurSPSIsZrO+7S9UEmxsgvMqqpJ0HuysNFKAkqC641VK kqwN6JgExXLk2+R5klZ6EY7VzDJ7fnQ7mE3NSKtSEvhUnWCOCRggSt7L0Om4FUp7wgIQ xSxxsv1it0fEW6a0mF0JxFPstSytTC9a7Sjh87ZsecE17Fb9pkPMG1b2s3WiWQIfl2zc W0EqDXFRHWU/VDzbXPIYJs5IzO2h59KlHHvzJofRtF7JRUOPdjqpCUH7sPeBWd8PBaUa zLFI15Y/CbGYpvt9m6J4Zm5d0KRIuoyuOJnsGvpWrf4WyBebyZ9UiZ/9g+QeHpHXBesm T3/g== MIME-Version: 1.0 X-Received: by 10.180.8.4 with SMTP id n4mr11374280wia.13.1363527126849; Sun, 17 Mar 2013 06:32:06 -0700 (PDT) Received: by 10.194.61.236 with HTTP; Sun, 17 Mar 2013 06:32:06 -0700 (PDT) In-Reply-To: References: <20130315103701.B071023888CD@eris.apache.org> Date: Sun, 17 Mar 2013 13:32:06 +0000 Message-ID: Subject: Re: svn commit: r1456871 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java From: sebb To: Commons Developers List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On 17 March 2013 13:18, Simone Tripodi wrote: >>> /** >>> + * the decoding table size. >>> + */ >>> + private static final int DECODING_TABLE_SIZE = 256; >>> + >> >> The Javadoc does not say why the value 256 is used, so the number is >> still a magic number ... >> > > What should be added more than `the decoding table size` in javadoc? Why is it 256 and not 127 or 13 or 512 or some other arbitrary number? Are there any restrictions on what it could be? About the only numbers that are not always magic are 0, 1 and -1. Other numbers need to be explained. > I'd rather continue investing time on a private static field of a > package-private class... > >> >> In this case, I'm not sure that using a constant add any benefit as >> the value was only used once. >> I think Checkstyle is being too strict here; I suggest leaving this >> change, but I don't see a need to fix everything the Checkstyle does >> not like. >> > > Agreed - I had two options: > > 1) suppress the rule; > > 2) just make checkstyle happy. > > Even if I was really tempted by #1, at the end I went to #2 to be > conform to more popular way of coding - I sure someone would have > fixed it, sooner or later... Unfortunately the fix means that the problem - that the number is magic - is no longer reported, so the whole point of the Checkstyle rule has been lost. > http://people.apache.org/~simonetripodi/ > http://simonetripodi.livejournal.com/ > http://twitter.com/simonetripodi > http://www.99soft.org/ > > --------------------------------------------------------------------- > 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