Skip to content

Commit

Permalink
Fix Reports Success/Warning icons, counts
Browse files Browse the repository at this point in the history
  • Loading branch information
sultan committed Oct 16, 2022
1 parent 04d6d63 commit dd974f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ protected void renderTableHeaderCells( String... keys )

protected String getLabel( ArtifactVersion version, AbstractVersionDetails details )
{

if ( equals( version, newestUpdateCache.get( details, of( SUBINCREMENTAL ) ) ) )
{
return getText( "report.latestSubIncremental" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void incrementDependencies()
*
* @param updates collection of all version updates, typically from {@linkplain PluginUpdatesModel#getAllUpdates()}
* @param cache if not null, cache to retrieve the version information, initialised with
* the {@link ArtifactVersions#getOldestUpdate(Optional)} update information
* the {@link ArtifactVersions#getNewestUpdate(Optional)} update information
* @param <T> always equal to {@linkplain PluginOverviewStats}
* @param <V> always equal to {@linkplain org.codehaus.mojo.versions.PluginUpdatesDetails}
* @return instance of the {@linkplain PluginOverviewStats}, initialised with the update information
Expand All @@ -66,19 +66,19 @@ public static <T extends OverviewStats, V extends ArtifactVersions> T fromUpdate
PluginOverviewStats stats = new PluginOverviewStats();
updates.forEach( details ->
{
if ( getOldestUpdate( cache, details, of( SUBINCREMENTAL ) ) != null )
if ( getNewestUpdate( cache, details, of( SUBINCREMENTAL ) ) != null )
{
stats.incrementAny();
}
else if ( getOldestUpdate( cache, details, of( INCREMENTAL ) ) != null )
else if ( getNewestUpdate( cache, details, of( INCREMENTAL ) ) != null )
{
stats.incrementIncremental();
}
else if ( getOldestUpdate( cache, details, of( MINOR ) ) != null )
else if ( getNewestUpdate( cache, details, of( MINOR ) ) != null )
{
stats.incrementMinor();
}
else if ( getOldestUpdate( cache, details, of( MAJOR ) ) != null )
else if ( getNewestUpdate( cache, details, of( MAJOR ) ) != null )
{
stats.incrementMajor();
}
Expand Down

0 comments on commit dd974f7

Please sign in to comment.