mirror of https://github.com/apache/maven.git
Simplified nested if-rules for model container action.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@719293 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d12af86b03
commit
1f5a668726
|
@ -176,35 +176,18 @@ public final class ArtifactModelContainerFactory
|
|||
}
|
||||
|
||||
ArtifactModelContainer c = (ArtifactModelContainer) modelContainer;
|
||||
if ( c.groupId.equals( groupId ) && c.artifactId.equals( artifactId ) )
|
||||
if ( c.groupId.equals( groupId ) && c.artifactId.equals( artifactId ) && c.type.equals( type ) )
|
||||
{
|
||||
if ( c.version.equals( version ) )
|
||||
{
|
||||
if ( c.type.equals( type ) )
|
||||
{
|
||||
return ModelContainerAction.JOIN;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ModelContainerAction.NOP;
|
||||
}
|
||||
return ModelContainerAction.JOIN;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( c.type.equals( type ) )
|
||||
{
|
||||
return ModelContainerAction.DELETE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ModelContainerAction.NOP;
|
||||
}
|
||||
return ModelContainerAction.DELETE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return ModelContainerAction.NOP;
|
||||
}
|
||||
return ModelContainerAction.NOP;
|
||||
}
|
||||
|
||||
public ModelContainer createNewInstance( List<ModelProperty> modelProperties )
|
||||
|
|
Loading…
Reference in New Issue