mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
git: simplify: use ContainerUtil instead of Collections2
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user