mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
GitBranchesCollection: defensive copy.
This commit is contained in:
@@ -47,14 +47,20 @@ public final class GitBranchesCollection {
|
||||
myLocalBranches = localBranches;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the copy of local branches set.
|
||||
*/
|
||||
@NotNull
|
||||
public Set<GitBranch> getLocalBranches() {
|
||||
return myLocalBranches;
|
||||
return new HashSet<GitBranch>(myLocalBranches);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the copy of remote branches set.
|
||||
*/
|
||||
@NotNull
|
||||
public Set<GitBranch> getRemoteBranches() {
|
||||
return myRemoteBranches;
|
||||
return new HashSet<GitBranch>(myRemoteBranches);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user