I tried a bunch of things but they didn't work. I think (but not sure) that the controller object throws NullPointerExceptinon but I have no idea why.
Even when I comment out methods calls in Controller.onDeleteUser(long id) it throws the exception.
Anyone have an idea? I've spent like 8 hours on this:P
package com.codegym.task.task36.task3608;
import com.codegym.task.task36.task3608.bean.User;
public final class Util {
public static final String DELETED_MARKER = " (deleted)";
public static boolean isUserDeleted(User user) {
return user.getName().endsWith(DELETED_MARKER);
}
public static void markDeleted(User user) {
if (User.NULL_USER != user && !Util.isUserDeleted(user)) {
user.setName(user.getName() + DELETED_MARKER);
}
}
}