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

Redundant conditions in an if statement

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.3.0
    • 3.4.0
    • Client Library
    • 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

            wikier Sergio Fernández
            songwang songwanging
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: