private static boolean compare (Object one, Object two) {
        if (one == null && two != null) {
            return false;
        }
        else if (one != null) {
            if (!one.equals(two)) {
                return false;
            }
        }
        return true;
    }
Returns true if two objects are equal. This is a helper method
to assist with the case that one or both objects are {@code null};
if both objects are {@code null} then they're considered equal.

@param one the first object.
@param two the second object.
@return true if the objects are equal.
xmppserver/src/main/java/org/jivesoftware/openfire/SessionResultFilter.java