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
--- a/src/main/java/de/uapcore/lightpit/viewmodel/IssueEditView.java	Sun Jun 21 12:32:25 2020 +0200
+++ b/src/main/java/de/uapcore/lightpit/viewmodel/IssueEditView.java	Sun Jun 21 12:38:15 2020 +0200
@@ -2,16 +2,14 @@
 
 import de.uapcore.lightpit.entities.*;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
 
 public class IssueEditView {
     private final Issue issue;
 
     private List<Project> projects = Collections.emptyList();
-    private List<Version> versionsUpcoming = new ArrayList<>();
-    private List<Version> versionsRecent = new ArrayList<>();
+    private Set<Version> versionsUpcoming = new HashSet<>();
+    private Set<Version> versionsRecent = new HashSet<>();
     private List<User> users;
 
     public IssueEditView(Issue issue) {
@@ -30,11 +28,11 @@
         this.projects = projects;
     }
 
-    public List<Version> getVersionsUpcoming() {
+    public Collection<Version> getVersionsUpcoming() {
         return versionsUpcoming;
     }
 
-    public List<Version> getVersionsRecent() {
+    public Collection<Version> getVersionsRecent() {
         return versionsRecent;
     }
 

mercurial