cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r773691 - /cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
Date Mon, 11 May 2009 20:56:05 GMT
Author: dkulp
Date: Mon May 11 20:56:05 2009
New Revision: 773691

URL: http://svn.apache.org/viewvc?rev=773691&view=rev
Log:
If reader created with fragment or document, ClassCast could happen

Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java?rev=773691&r1=773690&r2=773691&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
(original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
Mon May 11 20:56:05 2009
@@ -209,7 +209,7 @@
                 return frame.uris.get(index);
             }
 
-            if (frame.parent == null) {
+            if (frame.parent == null && frame.getElement() instanceof Element) {
                 return ((Element)frame.getElement()).lookupNamespaceURI(prefix);
             }
             frame = frame.parent;



Mime
View raw message