Rich,

Can you please explain in which context you got a NPE in this piece of
code? As Amila pointed out in AXIS2-4648, transportOut=null (or
sender=null) is not a normal condition and this change probably hides
a more fundamental problem.

Andreas

On Sun, Aug 8, 2010 at 14:50,  <[email protected]> wrote:
> Author: scheu
> Date: Sun Aug  8 12:50:02 2010
> New Revision: 983407
>
> URL: http://svn.apache.org/viewvc?rev=983407&view=rev
> Log:
> Simple NPE avoidance check
>
> Modified:
>    
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/ServiceClient.java
>
> Modified: 
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/ServiceClient.java
> URL: 
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/ServiceClient.java?rev=983407&r1=983406&r2=983407&view=diff
> ==============================================================================
> --- 
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/ServiceClient.java
>  (original)
> +++ 
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/ServiceClient.java
>  Sun Aug  8 12:50:02 2010
> @@ -857,7 +857,10 @@ public class ServiceClient {
>                     lastOperationContext
>                             
> .getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
>             if (outMessageContext != null) {
> -                
> outMessageContext.getTransportOut().getSender().cleanup(outMessageContext);
> +                if (outMessageContext.getTransportOut() != null &&
> +                        outMessageContext.getTransportOut().getSender() != 
> null) {
> +                    
> outMessageContext.getTransportOut().getSender().cleanup(outMessageContext);
> +                }
>             }
>         }
>     }
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to