]> source.dussan.org Git - archiva.git/commitdiff
[MRM-674] remove redundant code
authorBrett Porter <brett@apache.org>
Fri, 22 Feb 2008 05:28:53 +0000 (05:28 +0000)
committerBrett Porter <brett@apache.org>
Fri, 22 Feb 2008 05:28:53 +0000 (05:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches@630094 13f79535-47bb-0310-9956-ffa450edef68

archiva-1.0.x/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/LegacyPathParser.java
archiva-1.0.x/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/content/LegacyPathParserTest.java

index e1d5eaba3cefc902807d31e0d9930dca498a35e2..e62d1516d28a1bffbac63d4e38fca871e74c4d40 100644 (file)
@@ -204,13 +204,6 @@ public class LegacyPathParser
                     + "] 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;
index 0267e2abae3dba6c6c9fb72b9f6c0657880aca15..c86d66ff1fae249d24b703cda50d47c0078e33e6 100644 (file)
@@ -239,17 +239,9 @@ public class LegacyPathParserTest
     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" );
     }
 
     /**