You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by Andreas Veithen <an...@gmail.com> on 2010/09/28 13:06:50 UTC

Re: svn commit: r983407 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/ServiceClient.java

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,  <sc...@apache.org> 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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org