]> source.dussan.org Git - gitblit.git/commitdiff
Fix performance logging null pointer on anonymous repository browsing
authorJames Moger <james.moger@gitblit.com>
Fri, 17 Aug 2012 19:49:44 +0000 (15:49 -0400)
committerJames Moger <james.moger@gitblit.com>
Fri, 17 Aug 2012 19:49:44 +0000 (15:49 -0400)
src/com/gitblit/GitBlit.java

index 97fb5a9531ee55e51f994c40961936569d065594..0940c7682f75442f71c27d9841ecf536e32735a2 100644 (file)
@@ -931,7 +931,7 @@ public class GitBlit implements ServletContextListener {
                }\r
                long duration = System.currentTimeMillis() - methodStart;\r
                logger.info(MessageFormat.format("{0} repository models loaded for {1} in {2} msecs",\r
-                               repositories.size(), user.username, duration));\r
+                               repositories.size(), user == null ? "anonymous" : user.username, duration));\r
                return repositories;\r
        }\r
 \r