fix: ... but ofc they should not appear more than once...

Sun, 21 Jun 2020 12:38:15 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 21 Jun 2020 12:38:15 +0200
changeset 95
0552cc5755f3
parent 94
edba952cfc57
child 96
b7b685f31e39

fix: ... but ofc they should not appear more than once...

src/main/java/de/uapcore/lightpit/viewmodel/IssueEditView.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/main/java/de/uapcore/lightpit/viewmodel/IssueEditView.java	Sun Jun 21 12:32:25 2020 +0200
     1.2 +++ b/src/main/java/de/uapcore/lightpit/viewmodel/IssueEditView.java	Sun Jun 21 12:38:15 2020 +0200
     1.3 @@ -2,16 +2,14 @@
     1.4  
     1.5  import de.uapcore.lightpit.entities.*;
     1.6  
     1.7 -import java.util.ArrayList;
     1.8 -import java.util.Collections;
     1.9 -import java.util.List;
    1.10 +import java.util.*;
    1.11  
    1.12  public class IssueEditView {
    1.13      private final Issue issue;
    1.14  
    1.15      private List<Project> projects = Collections.emptyList();
    1.16 -    private List<Version> versionsUpcoming = new ArrayList<>();
    1.17 -    private List<Version> versionsRecent = new ArrayList<>();
    1.18 +    private Set<Version> versionsUpcoming = new HashSet<>();
    1.19 +    private Set<Version> versionsRecent = new HashSet<>();
    1.20      private List<User> users;
    1.21  
    1.22      public IssueEditView(Issue issue) {
    1.23 @@ -30,11 +28,11 @@
    1.24          this.projects = projects;
    1.25      }
    1.26  
    1.27 -    public List<Version> getVersionsUpcoming() {
    1.28 +    public Collection<Version> getVersionsUpcoming() {
    1.29          return versionsUpcoming;
    1.30      }
    1.31  
    1.32 -    public List<Version> getVersionsRecent() {
    1.33 +    public Collection<Version> getVersionsRecent() {
    1.34          return versionsRecent;
    1.35      }
    1.36  

mercurial