You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Stefan Koehler <st...@interface-projects.de> on 2001/09/05 17:42:41 UTC
ClassCastException in SourceHandlerImpl
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
AW: ClassCastException in SourceHandlerImpl
Posted by Carsten Ziegeler <cz...@sundn.de>.
Thanks for your patch, Stefan!
It's applied.
Carsten
> -----Ursprüngliche Nachricht-----
> Von: Stefan Koehler [mailto:stefan.koehler@interface-projects.de]
> Gesendet: Mittwoch, 5. September 2001 17:43
> An: cocoon-dev@xml.apache.org
> Betreff: ClassCastException in SourceHandlerImpl
>
>
> 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/sourc
> e/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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org