Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JENKINS-75341 sort deprecated monitor output #10346

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion core/src/main/java/hudson/PluginManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import static java.util.logging.Level.WARNING;
import static java.util.stream.Collectors.toList;

import com.google.common.collect.ImmutableSortedMap;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
Expand Down Expand Up @@ -2661,7 +2662,11 @@
public Map<PluginWrapper, String> getDeprecatedPlugins() {
return Jenkins.get().getPluginManager().getPlugins().stream()
.filter(PluginWrapper::isDeprecated)
.collect(Collectors.toMap(Function.identity(), it -> it.getDeprecations().get(0).url));
.collect(ImmutableSortedMap.toImmutableSortedMap(
Comparator.comparing(PluginWrapper::getDisplayName, String.CASE_INSENSITIVE_ORDER),
Function.identity(),
it -> it.getDeprecations().get(0).url

Check warning on line 2668 in core/src/main/java/hudson/PluginManager.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 2668 is not covered by tests
));
}
}

Expand Down
Loading