diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/gitblit/manager/UserManager.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/manager/UserManager.java b/src/main/java/com/gitblit/manager/UserManager.java index 86be8bcd..0d7ee9a5 100644 --- a/src/main/java/com/gitblit/manager/UserManager.java +++ b/src/main/java/com/gitblit/manager/UserManager.java @@ -83,9 +83,9 @@ public class UserManager implements IUserManager { * @param userService */ public void setUserService(IUserService userService) { - logger.info(userService.toString()); this.userService = userService; this.userService.setup(runtimeManager); + logger.info(userService.toString()); } @Override @@ -115,10 +115,12 @@ public class UserManager implements IUserManager { // check to see if this "file" is a custom user service class Class<?> realmClass = Class.forName(realm); service = (IUserService) realmClass.newInstance(); - } catch (Throwable t) { + } catch (ClassNotFoundException t) { // typical file path configuration File realmFile = runtimeManager.getFileOrFolder(Keys.realm.userService, "${baseFolder}/users.conf"); service = createUserService(realmFile); + } catch (InstantiationException | IllegalAccessException e) { + logger.error("failed to instanciate user service {}: {}", realm, e.getMessage()); } } setUserService(service); |