[Yanel-commits] rev 44187 - public/yanel/trunk/src/core/java/org/wyona/yanel/core/map

michi at wyona.com michi at wyona.com
Thu Aug 13 23:30:58 CEST 2009


Author: michi
Date: 2009-08-13 23:30:57 +0200 (Thu, 13 Aug 2009)
New Revision: 44187

Modified:
   public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmWithConfigurationExceptionImpl.java
Log:
check if realm name is null

Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmWithConfigurationExceptionImpl.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmWithConfigurationExceptionImpl.java	2009-08-13 20:27:02 UTC (rev 44186)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmWithConfigurationExceptionImpl.java	2009-08-13 21:30:57 UTC (rev 44187)
@@ -82,7 +82,13 @@
      * Init realm
      */
     public RealmWithConfigurationExceptionImpl(String name, String id, String mountPoint, File configFile, Exception configurationException) throws Exception {
-        this.name = name;
+        if (name != null) {
+            this.name = name;
+        } else {
+            log.warn("No name was set within yanel realms config for realm with id: " + id);
+            this.name = id;
+        }
+        this.name = this.name + " (Configuration exception!)";
         this.id = id;
         this.mountPoint = mountPoint;
         this.configFile = configFile;
@@ -90,7 +96,7 @@
     }
 
     /**
-     * Name of realm
+     * @see Realm#geName()
      */
     public String getName() {
         return name;



More information about the Yanel-commits mailing list