File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
src/main/java/com/flowingcode/addons/applayout/endpoint Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 55import com .flowingcode .addons .applayout .MenuItem ;
66import com .vaadin .flow .server .auth .AnonymousAllowed ;
77import com .vaadin .fusion .Endpoint ;
8+ import com .vaadin .fusion .Nonnull ;
89
910@ Endpoint
1011@ AnonymousAllowed
@@ -16,7 +17,7 @@ public MenuEndpoint(List<MenuItemsProvider> menuItemsProviders) {
1617 this .menuItemsProviders = menuItemsProviders ;
1718 }
1819
19- public List <MenuItemDto > getMenuItems () {
20+ public @ Nonnull List <@ Nonnull MenuItemDto > getMenuItems () {
2021 List <MenuItem > menuItems = menuItemsProviders .stream ().map (MenuItemsProvider ::getMenuItems ).flatMap (List ::stream ).collect (Collectors .toList ());
2122 return convertMenuItems (menuItems );
2223 }
Original file line number Diff line number Diff line change 22
33import java .util .ArrayList ;
44import java .util .List ;
5-
65import javax .annotation .Nullable ;
6+ import com .vaadin .fusion .Nonnull ;
77
88public class MenuItemDto {
99
1010 private String label ;
1111 @ Nullable
1212 private String href ;
13- private List <MenuItemDto > children = new ArrayList <>();
13+ private @ Nonnull List <@ Nonnull MenuItemDto > children = new ArrayList <>();
1414
1515 public MenuItemDto (String label , List <MenuItemDto > children ) {
1616 this (label ,null ,children );
@@ -40,10 +40,10 @@ public String getLabel() {
4040 public String getHref () {
4141 return href ;
4242 }
43- public void setHref (String href ) {
43+ public void setHref (@ Nonnull String href ) {
4444 this .href = href ;
4545 }
46- public void setLabel (String label ) {
46+ public void setLabel (@ Nonnull String label ) {
4747 this .label = label ;
4848 }
4949
You can’t perform that action at this time.
0 commit comments