commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r653323 - in /commons/proper/configuration/branches/configuration2_experimental: ./ src/main/java/org/apache/commons/configuration2/web/ src/test/java/org/apache/commons/configuration2/web/
Date Mon, 05 May 2008 07:11:12 GMT
Author: ebourg
Date: Mon May  5 00:11:12 2008
New Revision: 653323

URL: http://svn.apache.org/viewvc?rev=653323&view=rev
Log:
Fixed a regression in AppletConfiguration after the removal of Commons Collections
Disabled the headless mode for running the tests

Modified:
    commons/proper/configuration/branches/configuration2_experimental/pom.xml
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/AppletConfiguration.java
    commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/web/TestAppletConfiguration.java

Modified: commons/proper/configuration/branches/configuration2_experimental/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/pom.xml?rev=653323&r1=653322&r2=653323&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/pom.xml (original)
+++ commons/proper/configuration/branches/configuration2_experimental/pom.xml Mon May  5 00:11:12
2008
@@ -335,12 +335,6 @@
             <additionalClasspathElements>
               <additionalClasspathElement>src/test/resources/resources.jar</additionalClasspathElement>
             </additionalClasspathElements>
-            <systemProperties>
-              <property>
-                <name>java.awt.headless</name>
-                <value>true</value>
-              </property>
-            </systemProperties>
           </configuration>
         </plugin>
         <plugin>

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/AppletConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/AppletConfiguration.java?rev=653323&r1=653322&r2=653323&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/AppletConfiguration.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/AppletConfiguration.java
Mon May  5 00:11:12 2008
@@ -55,10 +55,13 @@
     public Iterator<String> getKeys()
     {
         String[][] paramsInfo = applet.getParameterInfo();
-        List<String> keyList = new ArrayList<String>(paramsInfo.length);
-        for (int i = 0; i < paramsInfo.length; i++)
+        List<String> keyList = new ArrayList<String>(paramsInfo != null ? paramsInfo.length
: 0);
+        if (paramsInfo != null)
         {
-            keyList.add(paramsInfo[i][0]);
+            for (int i = 0; i < paramsInfo.length; i++)
+            {
+                keyList.add(paramsInfo[i][0]);
+            }
         }
 
         return keyList.iterator();

Modified: commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/web/TestAppletConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/web/TestAppletConfiguration.java?rev=653323&r1=653322&r2=653323&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/web/TestAppletConfiguration.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/web/TestAppletConfiguration.java
Mon May  5 00:11:12 2008
@@ -17,21 +17,19 @@
 
 package org.apache.commons.configuration2.web;
 
+import java.applet.Applet;
+import java.util.Properties;
+
 import org.apache.commons.configuration2.AbstractConfiguration;
 import org.apache.commons.configuration2.MapConfiguration;
 import org.apache.commons.configuration2.TestAbstractConfiguration;
 import org.apache.commons.configuration2.flat.BaseConfiguration;
-import org.apache.commons.configuration2.web.AppletConfiguration;
-
-import java.applet.Applet;
-import java.util.Properties;
 
 /**
  * Test case for the {@link AppletConfiguration} class.
  *
  * @author Emmanuel Bourg
- * @version $Revision$, $Date: 2005-02-26 13:56:39 +0100 (Sa, 26 Feb
- * 2005) $
+ * @version $Revision$, $Date$
  */
 public class TestAppletConfiguration extends TestAbstractConfiguration
 {



Mime
View raw message