[MNG-7298] - Avoid redundant conditions.

This commit is contained in:
Arturo Bernal 2021-10-11 21:30:26 +02:00 committed by Sylwester Lachiewicz
parent 274388fc0f
commit 4c21e11b01
3 changed files with 3 additions and 3 deletions

View File

@ -160,7 +160,7 @@ public class VersionRange
process = process.substring( index + 1 ).trim();
if ( process.length() > 0 && process.startsWith( "," ) )
if ( process.startsWith( "," ) )
{
process = process.substring( 1 ).trim();
}

View File

@ -214,7 +214,7 @@ public class DefaultLegacyArtifactCollector
Map<String, Artifact> managedVersions )
{
ManagedVersionMap versionMap;
if ( ( managedVersions != null ) && ( managedVersions instanceof ManagedVersionMap ) )
if ( managedVersions instanceof ManagedVersionMap )
{
versionMap = (ManagedVersionMap) managedVersions;
}

View File

@ -175,7 +175,7 @@ public class MetadataGraphVertex
@Override
public boolean equals( Object vo )
{
if ( vo == null || !( vo instanceof MetadataGraphVertex ) )
if ( !( vo instanceof MetadataGraphVertex ) )
{
return false;
}