commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r895232 - /commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java
Date Sat, 02 Jan 2010 16:46:39 GMT
Author: oheger
Date: Sat Jan  2 16:46:38 2010
New Revision: 895232

URL: http://svn.apache.org/viewvc?rev=895232&view=rev
Log:
Disable a test under JDK 1.4 as required classes from org.slf4j are compiled with Java 1.5.

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=895232&r1=895231&r2=895232&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 Jan  2 16:46:38 2010
@@ -21,26 +21,27 @@
 import java.io.StringWriter;
 import java.util.Collection;
 import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.List;
-import java.util.Iterator;
 
 import junit.framework.TestCase;
 
 import org.apache.commons.configuration.beanutils.BeanHelper;
 import org.apache.commons.configuration.reloading.FileChangedReloadingStrategy;
-import org.apache.commons.configuration.tree.DefaultConfigurationNode;
 import org.apache.commons.configuration.tree.ConfigurationNode;
+import org.apache.commons.configuration.tree.DefaultConfigurationNode;
 import org.apache.commons.configuration.tree.xpath.XPathExpressionEngine;
+import org.apache.commons.lang.SystemUtils;
 import org.apache.commons.lang.text.StrLookup;
-import org.apache.commons.logging.LogFactory;
 import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.commons.logging.impl.Log4JLogger;
-import org.apache.log4j.WriterAppender;
-import org.apache.log4j.Logger;
 import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
 import org.apache.log4j.SimpleLayout;
+import org.apache.log4j.WriterAppender;
 
 /**
  * Test class for DefaultConfigurationBuilder.
@@ -986,15 +987,19 @@
 
     public void testExpression() throws Exception
     {
-        factory.setFile(EXPRESSION_FILE);
-        factory.setAttributeSplittingDisabled(true);
-        System.getProperties().remove("Id");
-        org.slf4j.MDC.clear();
-
-        CombinedConfiguration config = factory.getConfiguration(true);
-        assertTrue("Incorrect configuration", config instanceof DynamicCombinedConfiguration);
+        if (SystemUtils.isJavaVersionAtLeast(150))
+        {
+            factory.setFile(EXPRESSION_FILE);
+            factory.setAttributeSplittingDisabled(true);
+            System.getProperties().remove("Id");
+            org.slf4j.MDC.clear();
+
+            CombinedConfiguration config = factory.getConfiguration(true);
+            assertTrue("Incorrect configuration",
+                    config instanceof DynamicCombinedConfiguration);
 
-        verify("1001", config, 15);
+            verify("1001", config, 15);
+        }
     }
 
     private void verify(String key, CombinedConfiguration config, int rows)



Mime
View raw message