public static int nullSafeHashCode(@Nullable Object obj) {
        if (obj == null) {
            return 0;
        }
        if (obj.getClass().isArray()) {
            if (obj instanceof Object[]) {
                return nullSafeHashCode((Object[]) obj);
            }
            if (obj instanceof boolean[]) {
                return nullSafeHashCode((boolean[]) obj);
            }
            if (obj instanceof byte[]) {
                return nullSafeHashCode((byte[]) obj);
            }
            if (obj instanceof char[]) {
                return nullSafeHashCode((char[]) obj);
            }
            if (obj instanceof double[]) {
                return nullSafeHashCode((double[]) obj);
            }
            if (obj instanceof float[]) {
                return nullSafeHashCode((float[]) obj);
            }
            if (obj instanceof int[]) {
                return nullSafeHashCode((int[]) obj);
            }
            if (obj instanceof long[]) {
                return nullSafeHashCode((long[]) obj);
            }
            if (obj instanceof short[]) {
                return nullSafeHashCode((short[]) obj);
            }
        }
        return obj.hashCode();
    }
Return as hash code for the given object; typically the value of
{@code Object#hashCode()}}. If the object is an array,
this method will delegate to any of the {@code nullSafeHashCode}
methods for arrays in this class. If the object is {@code null},
this method returns 0.

see Object#hashCode()
see #nullSafeHashCode(Object[])
see #nullSafeHashCode(boolean[])
see #nullSafeHashCode(byte[])
see #nullSafeHashCode(char[])
see #nullSafeHashCode(double[])
see #nullSafeHashCode(float[])
see #nullSafeHashCode(int[])
see #nullSafeHashCode(long[])
see #nullSafeHashCode(short[])
analyzer/src/main/java/nl/basjes/parse/useragent/utils/springframework/util/ObjectUtils.java