You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2008/05/20 23:13:23 UTC
svn commit: r658437 - in /cxf/branches/2.0.x-fixes: ./
rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Author: dkulp
Date: Tue May 20 14:13:22 2008
New Revision: 658437
URL: http://svn.apache.org/viewvc?rev=658437&view=rev
Log:
Merged revisions 658241 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r658241 | dkulp | 2008-05-20 09:31:49 -0400 (Tue, 20 May 2008) | 2 lines
Guard against NPE when creating a fault
........
Modified:
cxf/branches/2.0.x-fixes/ (props changed)
cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java?rev=658437&r1=658436&r2=658437&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java (original)
+++ cxf/branches/2.0.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java Tue May 20 14:13:22 2008
@@ -589,8 +589,13 @@
} catch (Throwable ex) {
if (ex instanceof javax.xml.bind.UnmarshalException) {
javax.xml.bind.UnmarshalException unmarshalEx = (javax.xml.bind.UnmarshalException)ex;
- throw new Fault(new Message("UNMARSHAL_ERROR",
- BUNDLE, unmarshalEx.getLinkedException().getMessage()), ex);
+ if (unmarshalEx.getLinkedException() != null) {
+ throw new Fault(new Message("UNMARSHAL_ERROR", BUNDLE,
+ unmarshalEx.getLinkedException().getMessage()), ex);
+ } else {
+ throw new Fault(new Message("UNMARSHAL_ERROR", BUNDLE,
+ unmarshalEx.getMessage()), ex);
+ }
} else {
throw new Fault(new Message("UNMARSHAL_ERROR", BUNDLE, ex.getMessage()), ex);
}