Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 12925 invoked from network); 7 Mar 2009 18:11:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Mar 2009 18:11:27 -0000 Received: (qmail 45953 invoked by uid 500); 7 Mar 2009 18:11:26 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 45894 invoked by uid 500); 7 Mar 2009 18:11:25 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 45885 invoked by uid 99); 7 Mar 2009 18:11:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Mar 2009 10:11:25 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Mar 2009 18:11:23 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E0B772388920; Sat, 7 Mar 2009 18:11:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r751302 - /commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java Date: Sat, 07 Mar 2009 18:11:02 -0000 To: commits@commons.apache.org From: oheger@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090307181102.E0B772388920@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: oheger Date: Sat Mar 7 18:11:02 2009 New Revision: 751302 URL: http://svn.apache.org/viewvc?rev=751302&view=rev Log: Removed System.clearProperty() as it was introduced in JDK 1.5. Also removed two unused variables. Modified: commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java Modified: commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java?rev=751302&r1=751301&r2=751302&view=diff ============================================================================== --- commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java (original) +++ commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java Sat Mar 7 18:11:02 2009 @@ -19,9 +19,9 @@ import java.io.File; import java.io.IOException; import java.util.Collection; -import java.util.Set; -import java.util.Map; import java.util.HashMap; +import java.util.Map; +import java.util.Set; import junit.framework.TestCase; @@ -815,13 +815,13 @@ CombinedConfiguration cc = factory.getConfiguration(true); String value = cc.getInterpolator().lookup("test:test_key"); assertNotNull("The test key was not located", value); - assertEquals("Incorrect value retrieved","test.value",value); + assertEquals("Incorrect value retrieved","test.value",value); } - + public void testSystemProperties() throws Exception { factory.setFile(SYSTEM_PROPS_FILE); - CombinedConfiguration cc = factory.getConfiguration(true); + factory.getConfiguration(true); String value = System.getProperty("key1"); assertNotNull("The test key was not located", value); assertEquals("Incorrect value retrieved","value1",value); @@ -831,7 +831,7 @@ public void testValidation() throws Exception { factory.setFile(VALIDATION_FILE); - CombinedConfiguration cc = factory.getConfiguration(true); + factory.getConfiguration(true); String value = System.getProperty("key1"); assertNotNull("The test key was not located", value); assertEquals("Incorrect value retrieved","value1",value); @@ -840,7 +840,7 @@ public void testMultiTenentConfiguration() throws Exception { factory.setFile(MULTI_TENENT_FILE); - System.clearProperty("Id"); + System.getProperties().remove("Id"); CombinedConfiguration config = factory.getConfiguration(true); assertTrue("Incorrect configuration", config instanceof DynamicCombinedConfiguration);