X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fxmlrouter%2Fimpl%2FRobustIdentifiable.java;h=f371975fac804c378162084bc0e1a74536fbe2d9;hb=3b2c669b25bfcb5a3c3f06ff9180d85143bebb2a;hp=4e54fe30acd8c124949b887b62b452b586dc1499;hpb=9f2711b0a9147dac7cd72ef783c1c064b638d27d;p=xmlrouter diff --git a/impl/src/main/java/org/wamblee/xmlrouter/impl/RobustIdentifiable.java b/impl/src/main/java/org/wamblee/xmlrouter/impl/RobustIdentifiable.java index 4e54fe3..f371975 100644 --- a/impl/src/main/java/org/wamblee/xmlrouter/impl/RobustIdentifiable.java +++ b/impl/src/main/java/org/wamblee/xmlrouter/impl/RobustIdentifiable.java @@ -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 implements Identifiable { private Id id; - public RobustIdentifiable(String aPrefix, Identifiable aIdentifiable) { - notNull("prefix", aPrefix); + public RobustIdentifiable(Identifiable aIdentifiable) { notNull("identifiable", aIdentifiable); try { id = aIdentifiable.getId(); if (id == null) { throwConfigException("identifiable.getId() returned null", null); } - id = new Id(aPrefix + id.getId()); } catch (Exception e) { throwConfigException("identifiable.getId() threw exception", e); } @@ -55,7 +52,7 @@ public class RobustIdentifiable implements Identifiable { private void throwConfigException(String aMsg, Exception aException) { LOGGER.log(Level.WARNING, aMsg, aException); - throw new ConfigException("id is null"); + throw new ConfigException(aMsg); } @Override