@Test public void testEqualsVersionlessId() { Artifact artifact1 = null; Artifact artifact2 = null; assertEquals( false, ArtifactIdUtils.equalsVersionlessId( artifact1, artifact2 ) ); assertEquals( false, ArtifactIdUtils.equalsVersionlessId( artifact2, artifact1 ) ); artifact1 = new DefaultArtifact( "gid", "aid", "ext", "1.0-20110205.132618-23" ); assertEquals( false, ArtifactIdUtils.equalsVersionlessId( artifact1, artifact2 ) ); assertEquals( false, ArtifactIdUtils.equalsVersionlessId( artifact2, artifact1 ) ); artifact2 = new DefaultArtifact( "gidX", "aid", "ext", "1.0-20110205.132618-23" ); assertEquals( false, ArtifactIdUtils.equalsVersionlessId( artifact1, artifact2 ) ); assertEquals( false, ArtifactIdUtils.equalsVersionlessId( artifact2, artifact1 ) ); artifact2 = new DefaultArtifact( "gid", "aidX", "ext", "1.0-20110205.132618-23" ); assertEquals( false, ArtifactIdUtils.equalsVersionlessId( artifact1, artifact2 ) ); assertEquals( false, ArtifactIdUtils.equalsVersionlessId( artifact2, artifact1 ) ); artifact2 = new DefaultArtifact( "gid", "aid", "extX", "1.0-20110205.132618-23" ); assertEquals( false, ArtifactIdUtils.equalsVersionlessId( artifact1, artifact2 ) ); assertEquals( false, ArtifactIdUtils.equalsVersionlessId( artifact2, artifact1 ) ); artifact2 = new DefaultArtifact( "gid", "aid", "ext", "1.0-20110205.132618-24" ); assertEquals( true, ArtifactIdUtils.equalsVersionlessId( artifact1, artifact2 ) ); assertEquals( true, ArtifactIdUtils.equalsVersionlessId( artifact2, artifact1 ) ); artifact2 = new DefaultArtifact( "gid", "aid", "ext", "1.0-20110205.132618-23" ); assertEquals( true, ArtifactIdUtils.equalsVersionlessId( artifact1, artifact2 ) ); assertEquals( true, ArtifactIdUtils.equalsVersionlessId( artifact2, artifact1 ) ); assertEquals( true, ArtifactIdUtils.equalsVersionlessId( artifact1, artifact1 ) ); }
public static boolean equalsVersionlessId( Artifact artifact1, Artifact artifact2 ) { if ( artifact1 == null || artifact2 == null ) { return false; } if ( !eq( artifact1.getArtifactId(), artifact2.getArtifactId() ) ) { return false; } if ( !eq( artifact1.getGroupId(), artifact2.getGroupId() ) ) { return false; } if ( !eq( artifact1.getExtension(), artifact2.getExtension() ) ) { return false; } if ( !eq( artifact1.getClassifier(), artifact2.getClassifier() ) ) { return false; } return true; }
ArtifactIdUtils { public static boolean equalsVersionlessId( Artifact artifact1, Artifact artifact2 ) { if ( artifact1 == null || artifact2 == null ) { return false; } if ( !eq( artifact1.getArtifactId(), artifact2.getArtifactId() ) ) { return false; } if ( !eq( artifact1.getGroupId(), artifact2.getGroupId() ) ) { return false; } if ( !eq( artifact1.getExtension(), artifact2.getExtension() ) ) { return false; } if ( !eq( artifact1.getClassifier(), artifact2.getClassifier() ) ) { return false; } return true; } }
ArtifactIdUtils { public static boolean equalsVersionlessId( Artifact artifact1, Artifact artifact2 ) { if ( artifact1 == null || artifact2 == null ) { return false; } if ( !eq( artifact1.getArtifactId(), artifact2.getArtifactId() ) ) { return false; } if ( !eq( artifact1.getGroupId(), artifact2.getGroupId() ) ) { return false; } if ( !eq( artifact1.getExtension(), artifact2.getExtension() ) ) { return false; } if ( !eq( artifact1.getClassifier(), artifact2.getClassifier() ) ) { return false; } return true; } private  ArtifactIdUtils(); }
ArtifactIdUtils { public static boolean equalsVersionlessId( Artifact artifact1, Artifact artifact2 ) { if ( artifact1 == null || artifact2 == null ) { return false; } if ( !eq( artifact1.getArtifactId(), artifact2.getArtifactId() ) ) { return false; } if ( !eq( artifact1.getGroupId(), artifact2.getGroupId() ) ) { return false; } if ( !eq( artifact1.getExtension(), artifact2.getExtension() ) ) { return false; } if ( !eq( artifact1.getClassifier(), artifact2.getClassifier() ) ) { return false; } return true; } private  ArtifactIdUtils(); static String toId( Artifact artifact ); static String toId( String groupId, String artifactId, String extension, String classifier, String version ); static String toBaseId( Artifact artifact ); static String toVersionlessId( Artifact artifact ); static String toVersionlessId( String groupId, String artifactId, String extension, String classifier ); static boolean equalsId( Artifact artifact1, Artifact artifact2 ); static boolean equalsBaseId( Artifact artifact1, Artifact artifact2 ); static boolean equalsVersionlessId( Artifact artifact1, Artifact artifact2 ); }
ArtifactIdUtils { public static boolean equalsVersionlessId( Artifact artifact1, Artifact artifact2 ) { if ( artifact1 == null || artifact2 == null ) { return false; } if ( !eq( artifact1.getArtifactId(), artifact2.getArtifactId() ) ) { return false; } if ( !eq( artifact1.getGroupId(), artifact2.getGroupId() ) ) { return false; } if ( !eq( artifact1.getExtension(), artifact2.getExtension() ) ) { return false; } if ( !eq( artifact1.getClassifier(), artifact2.getClassifier() ) ) { return false; } return true; } private  ArtifactIdUtils(); static String toId( Artifact artifact ); static String toId( String groupId, String artifactId, String extension, String classifier, String version ); static String toBaseId( Artifact artifact ); static String toVersionlessId( Artifact artifact ); static String toVersionlessId( String groupId, String artifactId, String extension, String classifier ); static boolean equalsId( Artifact artifact1, Artifact artifact2 ); static boolean equalsBaseId( Artifact artifact1, Artifact artifact2 ); static boolean equalsVersionlessId( Artifact artifact1, Artifact artifact2 );  }