Hi,

I get the following build error with the current CVS, it compiles inside
Eclipse but not using
"Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_07-b02)"


C:\Data\Eclipse\workspace-opensource\cocoon-2.1\src\java\org\apache\cocoon\
components\modules\input\BaseLinkModule.java:120:
unreported exception
org.apache.avalon.framework.configuration.ConfigurationException;
must be caught or declared to be thrown
                    add(getAttribute(name, modeConf, objectModel) );
                        ^
1 error

BUILD FAILED


The following patch fixes the problem and is also faster ;-)

Index: BaseLinkModule.java
===================================================================
RCS file:
/home/cvspublic/cocoon-2.1/src/java/org/apache/cocoon/components/modules/input/BaseLinkModule.java,v
retrieving revision 1.2
diff -u -r1.2 BaseLinkModule.java
--- BaseLinkModule.java 4 Jun 2003 13:06:48 -0000     1.2
+++ BaseLinkModule.java 7 Jun 2003 18:07:23 -0000
@@ -52,7 +52,6 @@
 package org.apache.cocoon.components.modules.input;

 import java.util.Iterator;
-import java.util.LinkedList;
 import java.util.Map;
 import java.util.Vector;

@@ -114,12 +113,10 @@

     public Object[] getAttributeValues(final String name, final
Configuration modeConf, final Map objectModel )
         throws ConfigurationException {
-
-        return (new LinkedList() {
-                {
-                    add(getAttribute(name, modeConf, objectModel) );
-                }
-            }).toArray();
+
+           Object [] result = new Object[1];
+           result[0] = getAttribute(name, modeConf, objectModel);
+           return result;
     }

 }

Reply via email to