refactor: replace Guava's Iterables.find with Stream API

This commit is contained in:
broDom
2017-07-03 17:09:50 +02:00
parent 7b03c19de6
commit fb2dfce631

View File

@@ -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);
}
/**