Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 54903 invoked from network); 31 Jan 2011 09:25:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Jan 2011 09:25:20 -0000 Received: (qmail 55373 invoked by uid 500); 31 Jan 2011 09:25:20 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 54817 invoked by uid 500); 31 Jan 2011 09:25:17 -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 54809 invoked by uid 99); 31 Jan 2011 09:25:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Jan 2011 09:25:17 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jak-commons-dev@m.gmane.org designates 80.91.229.12 as permitted sender) Received: from [80.91.229.12] (HELO lo.gmane.org) (80.91.229.12) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Jan 2011 09:25:09 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Pjq02-0007dt-0j for dev@commons.apache.org; Mon, 31 Jan 2011 10:24:42 +0100 Received: from mail.elsag-solutions.com ([62.154.225.82]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 Jan 2011 10:24:41 +0100 Received: from joerg.schaible by mail.elsag-solutions.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 Jan 2011 10:24:41 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: dev@commons.apache.org From: =?UTF-8?B?SsO2cmc=?= Schaible Subject: Re: [lang] enum for Java Version [was svn commit: r1065174 - ...] Followup-To: gmane.comp.jakarta.commons.devel Date: Mon, 31 Jan 2011 10:24 +0100 Lines: 28 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: mail.elsag-solutions.com User-Agent: KNode/4.4.7 Hi Hen, Henri Yandell wrote: > The enum is less to do with Android and more to do with the float and > int APIs being bizarre. The enum is to have something more useable. > > We could drop the enum and just go with String values. or use methods. I can see Niall's point if you use the enum in a switch statement and suddenly not all values are any longer addressed. But with static methods, this is not the case: class SystemUtils { boolean isJava16() { return JavaVersion.atLeast(JavaVersion.VERSION_1_6); } } However, I am not sure if we do us a favor with Android, if we don't mask its version i.e. do not return at least 1.5 compatibility. If a library uses this version check and an Android programmer wanted to use that library in his app, he has a problem. We created such a bad (Android) user experience in XStream and therefore I cannot recommend this approach at all. - Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org