/** * Check if the two given objects are either both null or both equal * according the {@link Object#equals(Object)} method of object1. * * @param object1 * @param object2 * @return true if equal, false otherwise */ public static boolean equals(final Object object1, final Object object2) { return (object1 == null && object2 == null) || equalsNonNull(object1, object2); }
/** * Are the two identities the same? * * @param author * @param committer * @return true is same, false otherwise */ protected boolean isSamePerson(final PersonIdent author, final PersonIdent committer) { return Check.equals(author.getName(), committer.getName()) && Check.equals(author.getEmailAddress(), committer.getEmailAddress()); }