mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-26512
java.lang.NullPointerException at git4idea.history.wholeTree.BranchSelectorAction.createActions(BranchSelectorAction.java:71) at git4idea.history.wholeTree.BasePopupAction.asTextAction(BasePopupAction.java:131) at git4idea.history.wholeTree.GitLogUI.createContextMenu(GitLogUI.java:527)
This commit is contained in:
@@ -21,7 +21,6 @@ import com.intellij.util.Consumer;
|
||||
import git4idea.GitBranch;
|
||||
import git4idea.history.browser.SymbolicRefs;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.TreeSet;
|
||||
|
||||
/**
|
||||
@@ -64,11 +63,12 @@ public class BranchSelectorAction extends BasePopupAction {
|
||||
actionConsumer.consume(new SelectBranchAction("*" + minusRefs(current.getFullName()), current.getFullName()));
|
||||
}
|
||||
final TreeSet<String> locals = mySymbolicRefs.getLocalBranches();
|
||||
final String currentName = current == null ? null : current.getName();
|
||||
if (locals != null && (! locals.isEmpty())) {
|
||||
final DefaultActionGroup local = new DefaultActionGroup("Local", true);
|
||||
actionConsumer.consume(local);
|
||||
for (String s : locals) {
|
||||
final String presentation = s.equals(current.getName()) ? ("*" + s) : s;
|
||||
final String presentation = s.equals(currentName) ? ("*" + s) : s;
|
||||
local.add(new SelectBranchAction(presentation, s));
|
||||
}
|
||||
}
|
||||
@@ -77,7 +77,7 @@ public class BranchSelectorAction extends BasePopupAction {
|
||||
final DefaultActionGroup remote = new DefaultActionGroup("Remote", true);
|
||||
actionConsumer.consume(remote);
|
||||
for (String s : remotes) {
|
||||
final String presentation = s.equals(current.getName()) ? ("*" + s) : s;
|
||||
final String presentation = s.equals(currentName) ? ("*" + s) : s;
|
||||
remote.add(new SelectBranchAction(presentation, GitBranch.REFS_REMOTES_PREFIX + s));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user