Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 57912 invoked from network); 4 Mar 2008 20:45:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Mar 2008 20:45:46 -0000 Received: (qmail 16263 invoked by uid 500); 4 Mar 2008 20:45:41 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 16179 invoked by uid 500); 4 Mar 2008 20:45:41 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 16170 invoked by uid 99); 4 Mar 2008 20:45:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2008 12:45:40 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [212.227.126.174] (HELO moutng.kundenserver.de) (212.227.126.174) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2008 20:44:54 +0000 Received: from [192.168.178.20] (p5B09AA35.dip0.t-ipconnect.de [91.9.170.53]) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis) id 0ML31I-1JWe0g3UUU-00038R; Tue, 04 Mar 2008 21:45:15 +0100 Message-ID: <47CDB4D6.9050701@oliver-heger.de> Date: Tue, 04 Mar 2008 21:45:10 +0100 From: Oliver Heger User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Jakarta Commons Developers List Subject: Re: [configuration] Type conversion References: <47C6DE34.90807@apache.org> <47C865AB.9090804@oliver-heger.de> <47C8A123.5030106@apache.org> <47C97425.9030105@oliver-heger.de> <47CC08FF.4020006@apache.org> In-Reply-To: <47CC08FF.4020006@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V01U2FsdGVkX19JQW+KPOZpt226KmGYJUbCHw2eaXCMnk4+bmi OUqkr9bMEEGgT7lcB2BN3D+Nlm7xdeXEHvUn05MoZyXuNHokMl JgxGAju+n63AlT7jsn81A== X-Virus-Checked: Checked by ClamAV on apache.org Emmanuel Bourg schrieb: > Oliver Heger a �crit : > >> Do we need to specify a date format? >> >> Because a configuration file is not intended to be viewed or edited by >> an end user we could define our own format (e.g. the format used by >> the java.sql date types) and always use it for date <-> string >> conversions. > > Properties file are often edited by hand, that's why we have a > PropertyConfigurationLayout class to keep the file easily readable by a > human being. Also, DataConfiguration already defines a default date > format if the user doesn't bother to specify one. > > >> This would simplify the API and its use. > > I would agree if the date conversion was a new feature, I'm just keeping > the vararg parameter to remain compatible with the existing > configuration files. > > Emmanuel Bourg > I agree that the date format should be configurable. But there are certainly other alternatives. For instance, the date format could be a property of the date converter. If users have special requirements, they can register a new date converter with a different format pattern, overriding the default one. I would really like to avoid adding a parameter to an interface method that is only used by a specific implementation of that interface. Oliver --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org