X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fxmlrouter%2Fimpl%2FRobustIdentifiable.java;h=4e54fe30acd8c124949b887b62b452b586dc1499;hb=9f2711b0a9147dac7cd72ef783c1c064b638d27d;hp=6622e3277a85e35ae2dbf527bac761ae07f1d3e9;hpb=75f42f00e16ceee9ea333e598c9287de20ede1c3;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 6622e32..4e54fe3 100644 --- a/impl/src/main/java/org/wamblee/xmlrouter/impl/RobustIdentifiable.java +++ b/impl/src/main/java/org/wamblee/xmlrouter/impl/RobustIdentifiable.java @@ -25,7 +25,8 @@ import org.wamblee.xmlrouter.config.ConfigException; import org.wamblee.xmlrouter.config.Identifiable; /** - * Robust identifiable provides robustness for identifiable objects. + * Robust identifiable provides robustness for identifiable objects. It adds + * equality based on the id. * * @author Erik Brakkee * @@ -37,14 +38,9 @@ public class RobustIdentifiable implements Identifiable { private Id id; - // TODO test this class. - // TODO test that id is constant even though delegated changes its id. - public RobustIdentifiable(String aPrefix, Identifiable aIdentifiable) { notNull("prefix", aPrefix); notNull("identifiable", aIdentifiable); - // TODO test id is null - // TODO getId() throws exception try { id = aIdentifiable.getId(); if (id == null) { @@ -67,8 +63,6 @@ public class RobustIdentifiable implements Identifiable { return id; } - // TODO test equals, hashcode. - @Override public int hashCode() { return id.hashCode();