Skip to content

Commit dd974f7

Browse files
committed
Fix Reports Success/Warning icons, counts
1 parent 04d6d63 commit dd974f7

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/main/java/org/codehaus/mojo/versions/reporting/AbstractVersionsReportRenderer.java

+1
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ protected void renderTableHeaderCells( String... keys )
421421

422422
protected String getLabel( ArtifactVersion version, AbstractVersionDetails details )
423423
{
424+
424425
if ( equals( version, newestUpdateCache.get( details, of( SUBINCREMENTAL ) ) ) )
425426
{
426427
return getText( "report.latestSubIncremental" );

src/main/java/org/codehaus/mojo/versions/reporting/PluginOverviewStats.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void incrementDependencies()
5555
*
5656
* @param updates collection of all version updates, typically from {@linkplain PluginUpdatesModel#getAllUpdates()}
5757
* @param cache if not null, cache to retrieve the version information, initialised with
58-
* the {@link ArtifactVersions#getOldestUpdate(Optional)} update information
58+
* the {@link ArtifactVersions#getNewestUpdate(Optional)} update information
5959
* @param <T> always equal to {@linkplain PluginOverviewStats}
6060
* @param <V> always equal to {@linkplain org.codehaus.mojo.versions.PluginUpdatesDetails}
6161
* @return instance of the {@linkplain PluginOverviewStats}, initialised with the update information
@@ -66,19 +66,19 @@ public static <T extends OverviewStats, V extends ArtifactVersions> T fromUpdate
6666
PluginOverviewStats stats = new PluginOverviewStats();
6767
updates.forEach( details ->
6868
{
69-
if ( getOldestUpdate( cache, details, of( SUBINCREMENTAL ) ) != null )
69+
if ( getNewestUpdate( cache, details, of( SUBINCREMENTAL ) ) != null )
7070
{
7171
stats.incrementAny();
7272
}
73-
else if ( getOldestUpdate( cache, details, of( INCREMENTAL ) ) != null )
73+
else if ( getNewestUpdate( cache, details, of( INCREMENTAL ) ) != null )
7474
{
7575
stats.incrementIncremental();
7676
}
77-
else if ( getOldestUpdate( cache, details, of( MINOR ) ) != null )
77+
else if ( getNewestUpdate( cache, details, of( MINOR ) ) != null )
7878
{
7979
stats.incrementMinor();
8080
}
81-
else if ( getOldestUpdate( cache, details, of( MAJOR ) ) != null )
81+
else if ( getNewestUpdate( cache, details, of( MAJOR ) ) != null )
8282
{
8383
stats.incrementMajor();
8484
}

0 commit comments

Comments
 (0)