continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1392399 - /continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
Date Mon, 01 Oct 2012 15:36:40 GMT
Author: brett
Date: Mon Oct  1 15:36:39 2012
New Revision: 1392399

URL: http://svn.apache.org/viewvc?rev=1392399&view=rev
Log:
[CONTINUUM-2687] clarify some text


Modified:
    continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java

Modified: continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java?rev=1392399&r1=1392398&r2=1392399&view=diff
==============================================================================
--- continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
(original)
+++ continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
Mon Oct  1 15:36:39 2012
@@ -262,18 +262,19 @@ public class DefaultContinuumReleaseMana
 
     public Map<String, String> getPreparedReleasesForProject( String groupId, String
artifactId )
     {
-        String releaseId = ArtifactUtils.versionlessKey( groupId, artifactId );
+        String key = ArtifactUtils.versionlessKey( groupId, artifactId );
 
         Map<String, String> projectPreparedReleases = new LinkedHashMap<String,
String>();
         Map<String, ReleaseDescriptor> preparedReleases = getPreparedReleases();
-        for ( String key : preparedReleases.keySet() )
+        for ( String releaseId : preparedReleases.keySet() )
         {
             // get exact match, or one with a timestamp appended
-            if ( key.equals( releaseId ) || key.startsWith( releaseId + ":" ) )
+            if ( releaseId.equals( key ) || releaseId.startsWith( key + ":" ) )
             {
-                ReleaseDescriptor descriptor = preparedReleases.get( key );
+                ReleaseDescriptor descriptor = preparedReleases.get( releaseId );
 
-                projectPreparedReleases.put( key, descriptor.getReleaseVersions().get( releaseId
).toString() );
+                // use key to lookup, not release ID - versions don't get any timestamp appended
+                projectPreparedReleases.put( releaseId, descriptor.getReleaseVersions().get(
key ).toString() );
             }
         }
         return projectPreparedReleases;



Mime
View raw message