diff --git a/src/main/java/org/jboss/as/quickstarts/tasksrs/service/UserResource.java b/src/main/java/org/jboss/as/quickstarts/tasksrs/service/UserResource.java index 923fc9c..fb764da 100644 --- a/src/main/java/org/jboss/as/quickstarts/tasksrs/service/UserResource.java +++ b/src/main/java/org/jboss/as/quickstarts/tasksrs/service/UserResource.java @@ -29,13 +29,13 @@ public List getUsers() { // TODO: Uncomment to sort users based on number of tasks -// Collections.sort(users, new Comparator() { -// -// @Override -// public int compare(User user1, User user2) { -// return Integer.compare(user2.getTasks().size(), user1.getTasks().size()); -// } -// }); + Collections.sort(users, new Comparator() { + + @Override + public int compare(User user1, User user2) { + return Integer.compare(user2.getTasks().size(), user1.getTasks().size()); + } + }); return users; }