diff --git a/plugins/git4idea/src/git4idea/branch/GitBranchesCollection.java b/plugins/git4idea/src/git4idea/branch/GitBranchesCollection.java index 1ee5976e76b6..e3081f99b088 100644 --- a/plugins/git4idea/src/git4idea/branch/GitBranchesCollection.java +++ b/plugins/git4idea/src/git4idea/branch/GitBranchesCollection.java @@ -23,7 +23,6 @@ import org.jetbrains.annotations.NotNull; import java.util.Collection; import java.util.Collections; -import java.util.HashSet; /** *

@@ -49,20 +48,14 @@ public final class GitBranchesCollection { myLocalBranches = localBranches; } - /** - * @return the copy of local branches set. - */ @NotNull public Collection getLocalBranches() { - return new HashSet(myLocalBranches); + return Collections.unmodifiableCollection(myLocalBranches); } - /** - * @return the copy of remote branches set. - */ @NotNull public Collection getRemoteBranches() { - return new HashSet(myRemoteBranches); + return Collections.unmodifiableCollection(myRemoteBranches); } public GitLocalBranch findLocalBranch(@NotNull final String name) {