X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fxmlrouter%2Fimpl%2FRobustIdentifiable.java;h=2e63a9799901f2616e6fdc6fc1438c80adf570a1;hb=2e9a88b0478d074974818dc384ca45c2bf4fdaa5;hp=d5ba9f95bf18a2691103e6336d20a4c97e76c12a;hpb=747a76582ebfd3e0696c40e6d0ca21fcd2e1be60;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 d5ba9f9..2e63a97 100644 --- a/impl/src/main/java/org/wamblee/xmlrouter/impl/RobustIdentifiable.java +++ b/impl/src/main/java/org/wamblee/xmlrouter/impl/RobustIdentifiable.java @@ -38,15 +38,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 +53,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 @@ -63,8 +61,6 @@ public class RobustIdentifiable implements Identifiable { return id; } - // TODO test equals, hashcode. - @Override public int hashCode() { return id.hashCode();