Uploaded image for project: 'Marmotta (Retired)'
  1. Marmotta (Retired)
  2. MARMOTTA-671

Redundant conditions in an if statement

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.0
    • Fix Version/s: 3.4.0
    • Component/s: Client Library
    • Labels:
      None

      Description

      Our tool DeepTect has detected the following two pieces of buggy code snippet, in which the if branch has exactly the same conditions.

      Path1: marmotta/client/marmotta-client-java/src/main/java/org/apache/marmotta/client/util/HTTPUtil.java

      if (StringUtils.isNotBlank(config.getMarmottaUser()) && StringUtils.isNotBlank(config.getMarmottaUser())) {
      ...
      }
      

      Path2: marmotta/libraries/ldpath/ldpath-backend-linkeddata/src/main/java/org/apache/marmotta/ldpath/backend/linkeddata/LDCacheBackend.java

      if(subject instanceof org.openrdf.model.URI && subject instanceof org.openrdf.model.URI) {
      ..
      }
      

      In the above code snippets, the if statement contains the same conditions

        Attachments

          Activity

            People

            • Assignee:
              wikier Sergio Fernández
              Reporter:
              songwang songwanging

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment