To save some typing and clarify my code, is there a standard version of the following method?
public static boolean bothNullOrEqual(Object x, Object y) {
return ( x == null ? y == null : x.equals(y) );
}
With Java 7 you can now directly do a null safe equals:
(The Jakarta Commons library ObjectUtils.equals() has become obsolete with Java 7)