diff --git a/common/resource/dependency-structure.ddf b/common/resource/dependency-structure.ddf index 6be78bfa1ed98d078917ddfc2cfd6006372eb2d3..89f093efe5084f831492f779f1171734128d62f2 100644 --- a/common/resource/dependency-structure.ddf +++ b/common/resource/dependency-structure.ddf @@ -43,4 +43,14 @@ layer layer3 = [db] [parser] check layeringOf layer0 layer1 layer2 -check [parser] independentOf ${package}.exceptions.UserFailureException \ No newline at end of file +check [parser] independentOf ${package}.exceptions.UserFailureException + +########################## +# Hierarchical Content API + +[hierarchical-content-api] = ${package}.io.hierarchical_content.api.* +[java] = java* *.annotation.* *.exceptions.* ch.systemsx.cisd.base.io.IRandomAccessFile +[java-and-hierarchical-content-api] = [java] [hierarchical-content-api] + +check sets [hierarchical-content-api] +check [hierarchical-content-api] dependentOnlyOn [java-and-hierarchical-content-api] \ No newline at end of file diff --git a/common/source/java/ch/systemsx/cisd/common/mail/EMailAddress.java b/common/source/java/ch/systemsx/cisd/common/mail/EMailAddress.java index 276bdb4dd68a82fecf66f0df59a3adbb5f9e6f1a..518baaec3cbe8b0134e156852af7ea404f1669c1 100644 --- a/common/source/java/ch/systemsx/cisd/common/mail/EMailAddress.java +++ b/common/source/java/ch/systemsx/cisd/common/mail/EMailAddress.java @@ -35,7 +35,7 @@ public final class EMailAddress implements Serializable { this(emailAddressOrNull, null); } - + public EMailAddress(String emailAddressOrNull, String personalNameOrNull) { this.emailAddressOrNull = emailAddressOrNull; @@ -68,9 +68,60 @@ public final class EMailAddress implements Serializable return "EmailAddress{email=" + emailAddressOrNull + "}"; } else { - return "EmailAddress{email=" + emailAddressOrNull + ", personalname='" + personalNameOrNull - + "'}"; + return "EmailAddress{email=" + emailAddressOrNull + ", personalname='" + + personalNameOrNull + "'}"; + } + } + + @Override + public int hashCode() + { + final int prime = 31; + int result = 1; + result = + prime * result + ((emailAddressOrNull == null) ? 0 : emailAddressOrNull.hashCode()); + result = + prime * result + ((personalNameOrNull == null) ? 0 : personalNameOrNull.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) + { + if (this == obj) + { + return true; + } + if (obj == null) + { + return false; + } + if (!(obj instanceof EMailAddress)) + { + return false; + } + EMailAddress other = (EMailAddress) obj; + if (emailAddressOrNull == null) + { + if (other.emailAddressOrNull != null) + { + return false; + } + } else if (!emailAddressOrNull.equals(other.emailAddressOrNull)) + { + return false; + } + if (personalNameOrNull == null) + { + if (other.personalNameOrNull != null) + { + return false; + } + } else if (!personalNameOrNull.equals(other.personalNameOrNull)) + { + return false; } + return true; } }