Link to the deprecation URL, not the plugin URL

This commit is contained in:
Daniel Beck committed 2020-05-26 21:40:24 +02:00
1 parent ab97dbbdaf
commit 9ae93b67a0
2 files changed
+5 -11

No files matched your search

+3 -2
View File
@@ -145,6 +145,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Future;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
@@ -2257,10 +2258,10 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
return !getDeprecatedPlugins().isEmpty();
}
public List<PluginWrapper> getDeprecatedPlugins() {
public Map<PluginWrapper, String> getDeprecatedPlugins() {
return Jenkins.get().getPluginManager().getPlugins().stream()
.filter(PluginWrapper::isDeprecated)
.collect(Collectors.toList());
.collect(Collectors.toMap(Function.identity(), it -> it.getDeprecations().get(0).url));
}
}