cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r604774 - /incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
Date Mon, 17 Dec 2007 05:27:59 GMT
Author: ffang
Date: Sun Dec 16 21:27:53 2007
New Revision: 604774

URL: http://svn.apache.org/viewvc?rev=604774&view=rev
Log:
add null pointer check

Modified:
    incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java

Modified: incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java?rev=604774&r1=604773&r2=604774&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
(original)
+++ incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/MAPAggregator.java
Sun Dec 16 21:27:53 2007
@@ -451,13 +451,17 @@
 
     private String getFaultNameFromMessage(final Message message) {
         Exception e = message.getContent(Exception.class);
+        Throwable cause = e.getCause();
+        if (cause == null) {
+            cause = e;
+        }
         if (e instanceof Fault) {
-            WebFault t = e.getCause().getClass().getAnnotation(WebFault.class);
+            WebFault t = cause.getClass().getAnnotation(WebFault.class);
             if (t != null) {
                 return t.name();
             }
         }
-        return e.getCause().getClass().getSimpleName();    
+        return cause.getClass().getSimpleName();    
     }
 
     protected String getActionUri(Message message) {



Mime
View raw message