Config no longer implements Identifiable because this was in violation of the contrac...
[xmlrouter] / impl / src / main / java / org / wamblee / xmlrouter / impl / RobustIdentifiable.java
index 4e54fe30acd8c124949b887b62b452b586dc1499..f371975fac804c378162084bc0e1a74536fbe2d9 100644 (file)
@@ -21,7 +21,6 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import org.wamblee.xmlrouter.common.Id;
-import org.wamblee.xmlrouter.config.ConfigException;
 import org.wamblee.xmlrouter.config.Identifiable;
 
 /**
@@ -38,15 +37,13 @@ public class RobustIdentifiable<T> implements Identifiable<T> {
 
     private Id<T> id;
 
-    public RobustIdentifiable(String aPrefix, Identifiable<T> aIdentifiable) {
-        notNull("prefix", aPrefix);
+    public RobustIdentifiable(Identifiable<T> aIdentifiable) {
         notNull("identifiable", aIdentifiable);
         try {
             id = aIdentifiable.getId();
             if (id == null) {
                 throwConfigException("identifiable.getId() returned null", null);
             }
-            id = new Id<T>(aPrefix + id.getId());
         } catch (Exception e) {
             throwConfigException("identifiable.getId() threw exception", e);
         }
@@ -55,7 +52,7 @@ public class RobustIdentifiable<T> implements Identifiable<T> {
 
     private void throwConfigException(String aMsg, Exception aException) {
         LOGGER.log(Level.WARNING, aMsg, aException);
-        throw new ConfigException("id is null");
+        throw new ConfigException(aMsg);
     }
 
     @Override