[jira] [Created] (AXIS2-5901) Redundant conditions in an if statement

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Created] (AXIS2-5901) Redundant conditions in an if statement

JIRA jira@apache.org
songwanging created AXIS2-5901:

             Summary: Redundant conditions in an if statement
                 Key: AXIS2-5901
                 URL: https://issues.apache.org/jira/browse/AXIS2-5901
             Project: Axis2
          Issue Type: Bug
          Components: kernel
            Reporter: songwanging
            Priority: Minor

Our tool DeepTect has detected a piece of buggy code snippet, in which the if branch has exactly the same conditions.

Path: axis2-java/modules/kernel/src/org/apache/axis2/context/OperationContext.java

if (mepString.equals(WSDL2Constants.MEP_URI_OUT_ONLY)
                || mepString.equals(WSDL2Constants.MEP_URI_OUT_ONLY)
                || ((mepString.equals(WSDL2Constants.MEP_URI_OUT_IN)
                    || mepString.equals(WSDL2Constants.MEP_URI_OUT_IN))
                    && !isComplete)) {

In the above code snippet, the if statement contains the same conditions.

This message was sent by Atlassian JIRA

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