code without effect in InstanceDispatcher
-----------------------------------------

         Key: AXIS2-643
         URL: http://issues.apache.org/jira/browse/AXIS2-643
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug

  Components: core  
    Versions: 1.0    
 Environment: Axis2 1.0 RC4
    Reporter: Kent Tong
    Priority: Trivial


In InstanceDispatcher.java, some code has no effect:

    public void invoke(MessageContext msgContext) throws AxisFault {
        .....
        // setting myEPR
        String transportURL = (String) 
msgContext.getProperty(Constants.Configuration.TRANSPORT_IN_URL);
        if (serviceContext != null) {
            if (transportURL != null) {
                serviceContext.setMyEPR(msgContext.getTo());
            }
            serviceContext.setMyEPR(msgContext.getTo());
        }
   }

No matter the transportURL is null or not, the result is that myEPR will be set 
to msgContext.getTo(). That is, the code can be simplified as:

        if (serviceContext != null) {
            serviceContext.setMyEPR(msgContext.getTo());
        }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to