refactor: replace anonymous types with lambdas

This commit is contained in:
broDom
2017-07-03 17:07:07 +02:00
parent db2d82b9ec
commit 397904adde
29 changed files with 285 additions and 640 deletions

View File

@@ -33,14 +33,13 @@ package sonia.scm.plugin;
//~--- non-JDK imports --------------------------------------------------------
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
//~--- JDK imports ------------------------------------------------------------
import java.util.List;
//~--- JDK imports ------------------------------------------------------------
/**
*
* @author Sebastian Sdorra
@@ -96,15 +95,7 @@ public final class PluginNode
*/
public PluginNode getChild(final String id)
{
return Iterables.find(children, new Predicate<PluginNode>()
{
@Override
public boolean apply(PluginNode node)
{
return node.getId().equals(id);
}
});
return Iterables.find(children, node -> node.getId().equals(id));
}
/**