Forgot an instanceof check in the URLHandlers
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@728289 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/URLHandlers.java b/framework/src/main/java/org/apache/felix/framework/URLHandlers.java
index a0be37c..07951f0 100644
--- a/framework/src/main/java/org/apache/felix/framework/URLHandlers.java
+++ b/framework/src/main/java/org/apache/felix/framework/URLHandlers.java
@@ -478,14 +478,22 @@
{
for (Iterator iter = m_streamHandlerCache.values().iterator();iter.hasNext();)
{
- ((URLHandlersStreamHandlerProxy) iter.next()).flush();
+ Object proxy = iter.next();
+ if (proxy instanceof URLHandlersStreamHandlerProxy)
+ {
+ ((URLHandlersStreamHandlerProxy) proxy).flush();
+ }
}
}
if (m_contentHandlerCache != null)
{
for (Iterator iter = m_contentHandlerCache.values().iterator();iter.hasNext();)
{
- ((URLHandlersContentHandlerProxy) iter.next()).flush();
+ Object proxy = iter.next();
+ if (proxy instanceof URLHandlersContentHandlerProxy)
+ {
+ ((URLHandlersContentHandlerProxy) proxy).flush();
+ }
}
}
}