mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 17:26:22 +01:00
remove throws NotFoundException and fix modify password
This commit is contained in:
@@ -71,7 +71,7 @@ public class ManagerDecorator<T extends ModelObject> implements Manager<T> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(T object) throws NotFoundException {
|
||||
public void delete(T object){
|
||||
decorated.delete(object);
|
||||
}
|
||||
|
||||
@@ -82,12 +82,12 @@ public class ManagerDecorator<T extends ModelObject> implements Manager<T> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modify(T object) throws NotFoundException {
|
||||
public void modify(T object){
|
||||
decorated.modify(object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh(T object) throws NotFoundException {
|
||||
public void refresh(T object){
|
||||
decorated.refresh(object);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package sonia.scm.user;
|
||||
public class ChangePasswordNotAllowedException extends RuntimeException {
|
||||
|
||||
public static final String WRONG_USER_TYPE = "User of type {0} are not allowed to change password";
|
||||
public static final String OLD_PASSWORD_REQUIRED = "the old password is required.";
|
||||
|
||||
public ChangePasswordNotAllowedException(String message) {
|
||||
super(message);
|
||||
|
||||
@@ -154,7 +154,7 @@ public class SyncingRealmHelperTest {
|
||||
* Tests {@link SyncingRealmHelper#store(Group)} with an existing group.
|
||||
*/
|
||||
@Test
|
||||
public void testStoreGroupModify() throws NotFoundException {
|
||||
public void testStoreGroupModify(){
|
||||
Group group = new Group("unit-test", "heartOfGold");
|
||||
|
||||
when(groupManager.get("heartOfGold")).thenReturn(group);
|
||||
@@ -191,7 +191,7 @@ public class SyncingRealmHelperTest {
|
||||
* Tests {@link SyncingRealmHelper#store(User)} with an existing user.
|
||||
*/
|
||||
@Test
|
||||
public void testStoreUserModify() throws NotFoundException {
|
||||
public void testStoreUserModify(){
|
||||
when(userManager.contains("tricia")).thenReturn(Boolean.TRUE);
|
||||
|
||||
User user = new User("tricia");
|
||||
|
||||
Reference in New Issue
Block a user