mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-21 15:02:17 +01:00
refactor: replace Guava's Iterables.find with Stream API
This commit is contained in:
@@ -33,7 +33,6 @@ package sonia.scm.plugin;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import java.util.List;
|
||||
@@ -95,7 +94,9 @@ public final class PluginNode
|
||||
*/
|
||||
public PluginNode getChild(final String id)
|
||||
{
|
||||
return Iterables.find(children, node -> node.getId().equals(id));
|
||||
return children.stream()
|
||||
.filter(node -> node.getId().equals(id)).findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user