Uploaded image for project: 'Maven Plugin Tools'
  1. Maven Plugin Tools
  2. MPLUGIN-330

If and else-if branches has the same condition

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5
    • Fix Version/s: 3.5.1
    • Component/s: Plugin Plugin
    • Labels:
      None

      Description

      Our tool DeepTect has detected a piece of buggy code snippet, in which the if and else branches has the same condition.

      Path: maven-plugin-tools/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java

      public void execute(){
      ...
      Set<Artifact> requestDependencies;
              if ( mojoDependencies == null )
              {
                  requestDependencies = dependencies;
              }
              else if ( mojoDependencies == null )
              {
                  requestDependencies = null;
              }
      ...
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hboutemy Hervé Boutemy
                Reporter:
                songwang songwanging
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: