[MRM-674] remove redundant code

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches@630094 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2008-02-22 05:28:53 +00:00
parent 8802ed3b8e
commit ea9f3fa9e1
2 changed files with 3 additions and 18 deletions

View File

@ -204,13 +204,6 @@ public ArtifactReference toArtifactReference( String path )
+ "] and layout specified type [" + expectedType + "] (which maps to extension: ["
+ expectedExtension + "]) on path [" + path + "]" );
}
// if ( classifier != null && !filename.endsWith( "-" + classifier + "." + extension ) )
// {
// throw new LayoutException( INVALID_ARTIFACT_PATH + "mismatch on filename [" + filename
// + "] and layout specified type [" + expectedType + "] (which maps to classifier: ["
// + classifier + "]) on path [" + path + "]" );
// }
}
return artifact;

View File

@ -239,17 +239,9 @@ public void testGoodFooLibSources()
public void testBadClassifierFooLibSources()
throws LayoutException
{
String path = "com.foo.lib/java-sources/foo-lib-2.1-alpha-1.jar";
try
{
parser.toArtifactReference( path );
fail( "Expected an exception" );
}
catch ( LayoutException e )
{
assertTrue( true );
}
assertBadPath( "com.foo.lib/java-sources/foo-lib-2.1-alpha-1.jar", "missing required classifier" );
assertBadPath( "com.foo.lib/java-sources/foo-lib-2.1-alpha-1-javadoc.jar", "incorrect classifier" );
assertBadPath( "com.foo.lib/java-sources/foo-lib-2.1-alpha-1-other.jar", "incorrect classifier" );
}
/**