]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1321] Snapshot is linking to oldest version in Archiva GUI
authorMaria Odea B. Ching <oching@apache.org>
Fri, 2 Apr 2010 11:18:43 +0000 (11:18 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Fri, 2 Apr 2010 11:18:43 +0000 (11:18 +0000)
submitted by Daniel Triphaus
o do not reverse the order of the list containing the snapshot versions

additional change made:
o updated unit test to correct behavior

git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-1.3.x@930242 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-database/src/main/java/org/apache/maven/archiva/database/browsing/DefaultRepositoryBrowsing.java
archiva-modules/archiva-database/src/test/java/org/apache/maven/archiva/database/browsing/RepositoryBrowsingTest.java

index 144f8c44f43ffbd6e5acb2e0dfd6379031838f04..888bf4726b514e8903228cf6a8d62f505ca26b9c 100644 (file)
@@ -343,7 +343,6 @@ public class DefaultRepositoryBrowsing
         {
             final List<String> versions = (List<String>) dao.query( new UniqueVersionConstraint( groupId, artifactId ) );
             Collections.sort( versions );
-            Collections.reverse( versions );
 
             for ( String uniqueVersion : versions )
             {
index 1a6600a8c51f74f25440a9f6f0e6baa576b1207c..f1e10bf5af561c77cd65968c02d704f4b28e39a4 100644 (file)
@@ -189,7 +189,7 @@ public class RepositoryBrowsingTest
         assertNotNull( "Artifact should not be null.", artifact );
         assertEquals( "org.apache.archiva", artifact.getGroupId() );
         assertEquals( "archiva-indexer", artifact.getArtifactId() );
-        assertEquals( "1.0-20070522.143249-1", artifact.getVersion() );       
+        assertEquals( "1.0-20070522.153141-2", artifact.getVersion() );       
         assertEquals( "jar", artifact.getPackaging() );
         
         String repoId = browser.getRepositoryId( USER_GUEST, GUEST_REPO_IDS, "org.apache.archiva", "archiva-indexer", "1.0-SNAPSHOT" );