diff --git a/plugins/git4idea/src/git4idea/branch/GitBranchesCollection.java b/plugins/git4idea/src/git4idea/branch/GitBranchesCollection.java index 6992ebe851eb..c840b382fec0 100644 --- a/plugins/git4idea/src/git4idea/branch/GitBranchesCollection.java +++ b/plugins/git4idea/src/git4idea/branch/GitBranchesCollection.java @@ -47,14 +47,20 @@ public final class GitBranchesCollection { myLocalBranches = localBranches; } + /** + * @return the copy of local branches set. + */ @NotNull public Set getLocalBranches() { - return myLocalBranches; + return new HashSet(myLocalBranches); } + /** + * @return the copy of remote branches set. + */ @NotNull public Set getRemoteBranches() { - return myRemoteBranches; + return new HashSet(myRemoteBranches); } /**