Skip to content

Commit 1ecb726

Browse files
author
Grzegorz Piwowarek
committed
Refactor StudentStore
1 parent 4a19a6b commit 1ecb726

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

play-framework/student-api/app/models/StudentStore.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package models;
22
import java.util.ArrayList;
33
import java.util.HashMap;
4-
import java.util.List;
4+
import java.util.HashSet;
55
import java.util.Map;
66
import java.util.Set;
77

@@ -27,7 +27,7 @@ public Student getStudent(int id) {
2727
}
2828

2929
public Set<Student> getAllStudents() {
30-
return (Set<Student>)students.values();
30+
return new HashSet<>(students.values());
3131
}
3232

3333
public Student updateStudent(Student student) {

0 commit comments

Comments
 (0)