You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2008/04/15 21:23:37 UTC

svn commit: r648386 - /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java

Author: dims
Date: Tue Apr 15 12:23:33 2008
New Revision: 648386

URL: http://svn.apache.org/viewvc?rev=648386&view=rev
Log:
fix build break - NPE

Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java?rev=648386&r1=648385&r2=648386&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java Tue Apr 15 12:23:33 2008
@@ -120,9 +120,12 @@
                 //Create a data source for the MIME Body Part
                 MimePartDataSource mpds = new MimePartDataSource(mbp);
                 long dataLength =data.length;
-                Integer value = (Integer)msgContext.getProperty(Constants.Configuration.MTOM_THRESHOLD);
-                int optimizedThreshold = (value!=null)?value.intValue():0;
-                
+                Integer value = null;
+                if (msgContext != null) {
+                    value = (Integer) msgContext.getProperty(Constants.Configuration.MTOM_THRESHOLD);
+                }
+                int optimizedThreshold = (value != null) ? value.intValue() : 0;
+
                 if(optimizedThreshold==0 || dataLength > optimizedThreshold){
                 	DataHandler dataHandler = new DataHandler(mpds);
                 	cid = addDataHandler(dataHandler);



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org