Introduce default error object with context for not found exceptions

This commit is contained in:
René Pfeuffer
2018-10-18 13:12:16 +02:00
parent a56aeca8d2
commit b74fb814b8
61 changed files with 395 additions and 1553 deletions

View File

@@ -219,7 +219,7 @@ public class DefaultUserManager extends AbstractUserManager
if (fresh == null)
{
throw new NotFoundException();
throw new NotFoundException(User.class, user.getName());
}
fresh.copyProperties(user);
@@ -419,7 +419,7 @@ public class DefaultUserManager extends AbstractUserManager
public void overwritePassword(String userId, String newPassword) {
User user = get(userId);
if (user == null) {
throw new NotFoundException();
throw new NotFoundException(User.class, userId);
}
if (!isTypeDefault(user)) {
throw new ChangePasswordNotAllowedException(user.getType());