Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 81143 invoked from network); 29 Mar 2004 16:56:07 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 29 Mar 2004 16:56:07 -0000 Received: (qmail 49545 invoked by uid 500); 29 Mar 2004 16:55:56 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 49478 invoked by uid 500); 29 Mar 2004 16:55:56 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 49460 invoked from network); 29 Mar 2004 16:55:55 -0000 Received: from unknown (HELO gateway.elsag.de) (134.98.65.18) by daedalus.apache.org with SMTP; 29 Mar 2004 16:55:55 -0000 Received: from vwall.elsag.de by gateway.elsag.de via smtpd (for daedalus.apache.org [208.185.179.12]) with SMTP; Mon, 29 Mar 2004 18:55:58 +0200 Received: from esmail by gateway.elsag.de via smtpd (for vwall.elsag.de [192.168.100.108]) with SMTP; Mon, 29 Mar 2004 18:55:57 +0200 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: [Configuration] Issue with subset and substitution X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Date: Mon, 29 Mar 2004 18:55:57 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [Configuration] Issue with subset and substitution Thread-Index: AcQVrrTbAFbplVVnS4m3Kk1O8+Oe4w== From: =?iso-8859-1?Q?J=F6rg_Schaible?= To: "Jakarta Commons Developers List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hello folks, today I've build a SNAPSHOT version of configurations and with the new = subsets I got a failed unit test in my own application. I've boiled it = down to something in commons-configuration that worked before the subset = refactoring: /** * Tests subsets and still can resolve elements */ public void testSubsetCanResolve() throws Exception { cc =3D new CompositeConfiguration(); final BaseConfiguration config =3D new BaseConfiguration(); config.addProperty("subset.tempfile", = "${java.io.tmp}/file.tmp"); cc.addConfiguration(config); = cc.addConfiguration(ConfigurationConverter.getConfiguration(System.getPro= perties())); Configuration subset =3D cc.subset("subset"); assertEquals(System.getProperty("java.io.tmp") + "/file.tmp", = subset.getString("tempfile")); } If you have a closer look, it is quite obvious, why it does not work, = since "subset" will mask now anything including the system properties. = It seems that the values were resolved first in the previous version ... Comments? Regards, J=F6rg --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org