Class c1 = o1.getClass(); Class c2 = o2.getClass(); if (!c1.equals(c2)) {
if (!t.transform(o1).equals(t.transform(o2))) {
    public static boolean arrayEquals(Object[] a1, Object[] a2) {        if ((a1 == null) ^ (a2 == null)) {            return false;        }        if (a1.length != a2.length) {            return false;        }        for (int i = 0; i < a1.length; i++) {            Object o1 = a1[i];            Object o2 = a2[i];            if (o1 == null) {                if (o2 != null) {                    return false;                }            } else if (o2 == null) {                return false;            } else {                Class c1 = o1.getClass();                Class c2 = o2.getClass();                if (!c1.equals(c2)) {                    return false;                }            }        }        return true;    }