You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,27 @@ public class Example(){
51
51
}
52
52
}
53
53
```
54
-
Please be aware of the exceptions thrown by the methods.
54
+
55
+
There is also the option to get all users sharing a list:
56
+
```Java
57
+
publicclassExample(){
58
+
59
+
@SneakyThrows
60
+
publicstaticvoidmain(String[] args){
61
+
62
+
// ...
63
+
64
+
// Get users
65
+
List<User> users = myList.getAllUsers();
66
+
67
+
// ...
68
+
}
69
+
}
70
+
71
+
```
72
+
73
+
74
+
Please be aware of the exceptions thrown by these methods.
55
75
In this example I used the `@SneakyThrows` annotation from lombok so I don't have a massive overhead using try-catch etc.
56
76
57
77
You have to catch and handle those exceptions by yourself (or annotate your method with at `@SneakyThrows` if your application allows that without it being to dirty)
0 commit comments