Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5856

Wrong null checker

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.0
    • Component/s: XMPP transport
    • Labels:
      None

      Description

      Hi

      In a recent GitHub snapshot, I've found a following code smell.

      Path: modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPListener.java

      165     public EndpointReference[] getEPRsForService(String serviceName, String ip) throws AxisFault {
      166         String domainName = serverCredentials.getDomainName() == null? serverCredentials.getDomainName()
      167                         : serverCredentials.getServerUrl();
      168         return new EndpointReference[]{new EndpointReference(XMPPConstants.XMPP_PREFIX +
      169                         serverCredentials.getAccountName() +"@"+ domainName +"/services/" + serviceName)};
      170     }
      

      In Line 166, serverCredentials.getDomainName() == null should be serverCredentials.getDomainName() != null ? This might be a trivial issue but wanted to report just in case.

      Thanks!

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lifove JC
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: