cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Koehler <stefan.koeh...@interface-projects.de>
Subject ClassCastException in SourceHandlerImpl
Date Wed, 05 Sep 2001 15:42:41 GMT
Hello,

Because of a ClassCastException I looked at the dispose() method of
org.apache.cocoon.components.source.SourceHandlerImpl
and found that it tries to cast the keys of the Map sourceFactories 
(which are Strings) to SourceFactory instead of the values. 
The following patch should fix it.

Stefan Köhler


Index: SourceHandlerImpl.java
===================================================================
RCS file: /home/cvspublic/xml-cocoon2/src/org/apache/cocoon/components/source/SourceHandlerImpl.java,v
retrieving revision 1.4
diff -u -r1.4 SourceHandlerImpl.java
--- SourceHandlerImpl.java      2001/08/20 13:55:13     1.4
+++ SourceHandlerImpl.java      2001/09/05 15:32:20
@@ -109,7 +109,7 @@
         if (this.urlFactory != null) {
             this.manager.release((Component)this.urlFactory);
         }
-        Iterator iter = this.sourceFactories.keySet().iterator();
+        Iterator iter = this.sourceFactories.values().iterator();
         SourceFactory current;
         while (iter.hasNext() == true) {
             current = (SourceFactory) iter.next();




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message