]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4462 Fix NPE when no realm configured
authorJulien HENRY <julien.henry@sonarsource.com>
Mon, 26 Aug 2013 12:11:16 +0000 (14:11 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Mon, 26 Aug 2013 12:11:16 +0000 (14:11 +0200)
sonar-server/src/main/webapp/WEB-INF/app/models/server.rb

index 57e9beae8d0e3f1dd3229621dc2881c450259b75..0e9950bc3a7cf17945fb8d46972b90191835bb39 100644 (file)
@@ -126,7 +126,7 @@ class Server
 
   def realm_name
     realm_factory = Api::Utils.java_facade.getCoreComponentByClassname('org.sonar.server.ui.SecurityRealmFactory')
-    if realm_factory
+    if realm_factory && realm_factory.getRealm()
       realm_factory.getRealm().getName()
     else
       nil