]> source.dussan.org Git - gitblit.git/commitdiff
Eliminate redundant read() and use accessor instead of direct cache access
authorJames Moger <james.moger@gitblit.com>
Mon, 23 Sep 2013 14:55:19 +0000 (10:55 -0400)
committerJames Moger <james.moger@gitblit.com>
Mon, 23 Sep 2013 14:55:19 +0000 (10:55 -0400)
src/main/java/com/gitblit/ConfigUserService.java

index 2475b9abe4dac6993e076788102970ed035a67cd..a9217b5c596af0694d4cf1899ee9b057917a5414 100644 (file)
@@ -186,8 +186,7 @@ public class ConfigUserService implements IUserService {
                if (!StringUtils.isEmpty(model.cookie)) {\r
                        return model.cookie;\r
                }\r
-               read();\r
-               UserModel storedModel = users.get(model.username.toLowerCase());\r
+               UserModel storedModel = getUserModel(model.username);\r
                if (storedModel == null) {\r
                        return null;\r
                }\r
@@ -229,7 +228,6 @@ public class ConfigUserService implements IUserService {
         */\r
        @Override\r
        public UserModel authenticate(String username, char[] password) {\r
-               read();\r
                UserModel returnedUser = null;\r
                UserModel user = getUserModel(username);\r
                if (user == null) {\r