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,26 +33,22 @@ package sonia.scm.plugin;
//~--- non-JDK imports --------------------------------------------------------
import com.google.common.base.Function;
import com.google.common.collect.Lists;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
//~--- JDK imports ------------------------------------------------------------
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.junit.Assert.assertThat;
//~--- JDK imports ------------------------------------------------------------
/**
*
* @author Sebastian Sdorra
@@ -265,15 +261,7 @@ public class PluginTreeTest
*/
private List<String> unwrapIds(List<PluginNode> nodes)
{
return Lists.transform(nodes, new Function<PluginNode, String>()
{
@Override
public String apply(PluginNode input)
{
return input.getId();
}
});
return Lists.transform(nodes, PluginNode::getId);
}
//~--- fields ---------------------------------------------------------------