Uploaded image for project: 'OODT (Retired)'
  1. OODT (Retired)
  2. OODT-950

Condition that compares the same expression

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 1.9
    • push pull framework
    • None
    • Don't Know (Unsure) - The default level

    Description

      Hi

      In a recent Github mirror, I've found the following suspicious code in pushpull/src/main/java/org/apache/oodt/cas/pushpull/retrievalsystem/FileRetrievalSystem.java

      662     Protocol modifyAvailableSessionForPath(RemoteSiteFile file)
      663             throws RemoteConnectionException {
      664         Protocol session = getAvailableSession();
      665         if (!file.getSite().getURL().getHost().equals(
      666                 file.getSite().getURL().getHost())
      667                 || !protocolHandler.isProtocolConnected(session)) {
      668             protocolHandler.disconnect(session);
      669             session = protocolHandler.getAppropriateProtocol(file, /* reuse */
      670             false, /* navigate */true);
      671         } else {
      

      In Line 665 and 666, equals compares the same expression. This may not be an issue but wanted to report just in case. Thanks!

      Attachments

        Activity

          People

            chrismattmann Chris A. Mattmann
            lifove JC
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment