You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Hervé Boutemy (JIRA)" <ji...@apache.org> on 2018/01/04 07:00:00 UTC

[jira] [Updated] (MPLUGIN-330) If and else-if branches has the same condition

     [ https://issues.apache.org/jira/browse/MPLUGIN-330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hervé Boutemy updated MPLUGIN-330:
----------------------------------
    Fix Version/s: 3.5.1

> If and else-if branches has the same condition
> ----------------------------------------------
>
>                 Key: MPLUGIN-330
>                 URL: https://issues.apache.org/jira/browse/MPLUGIN-330
>             Project: Maven Plugin Tools
>          Issue Type: Bug
>          Components: Plugin Plugin
>    Affects Versions: 3.5
>            Reporter: songwanging
>            Priority: Minor
>             Fix For: 3.5.1
>
>
> 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
> {code:java}
> public void execute(){
> ...
> Set<Artifact> requestDependencies;
>         if ( mojoDependencies == null )
>         {
>             requestDependencies = dependencies;
>         }
>         else if ( mojoDependencies == null )
>         {
>             requestDependencies = null;
>         }
> ...
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)