cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1559185 - /cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
Date Fri, 17 Jan 2014 17:03:54 GMT
Author: dkulp
Date: Fri Jan 17 17:03:54 2014
New Revision: 1559185

URL: http://svn.apache.org/r1559185
Log:
Merged revisions 1559172 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1559172 | dkulp | 2014-01-17 11:33:41 -0500 (Fri, 17 Jan 2014) | 2 lines

  [CXF-5498] Put a DOM level3 check around DOM level 3 API call

........

Modified:
    cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java

Modified: cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java?rev=1559185&r1=1559184&r2=1559185&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
(original)
+++ cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
Fri Jan 17 17:03:54 2014
@@ -85,7 +85,12 @@ public class W3CDOMStreamReader extends 
         return document;
     }
     public String getSystemId() {
-        return sysId == null ? document.getDocumentURI() : sysId;
+        try {
+            return sysId == null ? document.getDocumentURI() : sysId;
+        } catch (Throwable ex) {
+            //ignore, probably not DOM level 3
+        }
+        return sysId;
     }
     /**
      * Find name spaces declaration in atrributes and move them to separate
@@ -429,8 +434,6 @@ public class W3CDOMStreamReader extends 
         }
         try {
             return StaxUtils.toString(document);
-        } catch (XMLStreamException e) {
-            return super.toString();
         } catch (Throwable t) {
             t.printStackTrace();
             return super.toString();



Mime
View raw message