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

If and else-if branches has the same condition

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.5
    • 3.5.1
    • Plugin Plugin
    • 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

              hboutemy Herve Boutemy
              songwang songwanging
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: