Skip to content

Commit d25f091

Browse files
committed
Simplify and do what happened before
1 parent 6a2f916 commit d25f091

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

shared/src/main/java/eu/maveniverse/maven/toolbox/shared/internal/ToolboxCommandoImpl.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,18 +1303,17 @@ public Result<Map<Artifact, List<Version>>> versions(
13031303
.say(context, artifacts.size());
13041304
for (Artifact artifact : artifacts) {
13051305
List<Version> newer = toolboxResolver.findNewerVersions(artifact, versionPredicate);
1306+
result.put(artifact, newer);
13061307
if (!newer.isEmpty()) {
13071308
String selected = versionSelector.apply(artifact, newer);
1308-
String all = newer.stream().map(Object::toString).collect(Collectors.joining(", "));
13091309
boolean changed = !Objects.equals(selected, artifact.getVersion());
13101310
if (changed) {
1311-
result.put(artifact, newer);
13121311
output.marker(Output.Verbosity.NORMAL)
13131312
.scary("* {} -> {}")
13141313
.say(ArtifactIdUtils.toId(artifact), selected);
13151314
output.marker(Output.Verbosity.SUGGEST)
13161315
.detail(" Available: {}")
1317-
.say(all);
1316+
.say(newer.stream().map(Object::toString).collect(Collectors.joining(", ")));
13181317
continue;
13191318
}
13201319
}

0 commit comments

Comments
 (0)