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

michi at wyona.com michi at wyona.com
Sat May 12 01:01:23 CEST 2007


Author: michi
Date: 2007-05-12 01:01:21 +0200 (Sat, 12 May 2007)
New Revision: 24385

Modified:
   public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmConfiguration.java
Log:
throw exception when trying to create a realm with existing realm id

Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmConfiguration.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmConfiguration.java	2007-05-11 22:21:39 UTC (rev 24384)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmConfiguration.java	2007-05-11 23:01:21 UTC (rev 24385)
@@ -291,7 +291,7 @@
     public void addRealm(String realmID, String realmName, String mountPoint, String configFileSrc) throws Exception {
         if (getRealm(realmID) != null) {
             log.warn("Cannot add realm: " + realmID + " (realm with this ID exists already)");
-            return; // TODO: throw Exception
+            throw new Exception("Cannot add realm: " + realmID + " (realm with this ID exists already)");
         }
         log.debug("adding realm: " + realmID);
         DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
@@ -358,7 +358,7 @@
             String destMountPoint, File destDir) throws Exception {
         if (getRealm(destRealmID) != null) {
             log.warn("Cannot add realm: " + destRealmID + " (realm with this ID exists already)");
-            return; // TODO: throw Exception
+            throw new Exception("Cannot add realm: " + destRealmID + " (realm with this ID exists already)");
         }
         DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
 




More information about the Yanel-commits mailing list