git: simplify: use ContainerUtil instead of Collections2

This commit is contained in:
Kirill Likhodedov
2018-03-26 22:03:47 +03:00
parent 1fae3c911b
commit 5a8f803ece
@@ -15,7 +15,6 @@
*/
package git4idea.branch;
import com.google.common.base.Function;
import com.google.common.collect.Collections2;
import com.intellij.dvcs.DvcsUtil;
import com.intellij.openapi.diagnostic.Logger;
@@ -58,10 +57,6 @@ public class GitBranchUtil {
private static final Logger LOG = Logger.getInstance(GitBranchUtil.class);
private static final Function<GitBranch,String> BRANCH_TO_NAME = input -> {
assert input != null;
return input.getName();
};
// The name that specifies that git is on specific commit rather then on some branch ({@value})
private static final String NO_BRANCH_NAME = "(no branch)";
@@ -103,7 +98,7 @@ public class GitBranchUtil {
@NotNull
public static Collection<String> convertBranchesToNames(@NotNull Collection<? extends GitBranch> branches) {
return Collections2.transform(branches, BRANCH_TO_NAME);
return ContainerUtil.map(branches, GitBranch::getName);
}
/**