archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r630813 - in /maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-repository-layer/src: main/java/org/apache/maven/archiva/repository/content/ test/java/org/apache/maven/archiva/repository/content/
Date Mon, 25 Feb 2008 11:27:32 GMT
Author: brett
Date: Mon Feb 25 03:27:31 2008
New Revision: 630813

URL: http://svn.apache.org/viewvc?rev=630813&view=rev
Log:
[MRM-713] extensionPattern in FilenameParser is incorrect
Submitted by:  	 james ahlborn
Merged from: r630811

Modified:
    maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/FilenameParser.java
    maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/content/FilenameParserTest.java

Modified: maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/FilenameParser.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/FilenameParser.java?rev=630813&r1=630812&r2=630813&view=diff
==============================================================================
--- maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/FilenameParser.java
(original)
+++ maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/FilenameParser.java
Mon Feb 25 03:27:31 2008
@@ -41,7 +41,7 @@
     private static final Pattern mavenPluginPattern = Pattern.compile( "(maven-.*-plugin)|(.*-maven-plugin)"
);
 
     private static final Pattern extensionPattern =
-        Pattern.compile( "(.tar.gz$)|(.tar.bz2$)|(.[a-z0-9]*$)", Pattern.CASE_INSENSITIVE
);
+        Pattern.compile( "(\\.tar\\.gz$)|(\\.tar\\.bz2$)|(\\.[a-z0-9]*$)", Pattern.CASE_INSENSITIVE
);
 
     private static final Pattern SNAPSHOT_PATTERN = Pattern.compile( "^([0-9]{8}\\.[0-9]{6}-[0-9]+)(.*)$"
);
 

Modified: maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/content/FilenameParserTest.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/content/FilenameParserTest.java?rev=630813&r1=630812&r2=630813&view=diff
==============================================================================
--- maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/content/FilenameParserTest.java
(original)
+++ maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/content/FilenameParserTest.java
Mon Feb 25 03:27:31 2008
@@ -179,4 +179,10 @@
         assertEquals( "artifact-id-1.0-20070219.171202-34-test-sources", parser.getName()
);
         assertEquals( "jar", parser.getExtension() );
     }
+
+    public void testNoExtension()
+    {
+        FilenameParser parser = new FilenameParser( "foo_bar" );
+        assertNull( parser.getExtension() );
+    }
 }



Mime
View raw message