public static boolean isAssignableOld()

in src/main/java/com/ql/util/express/ExpressUtil.java [195:236]


    public static boolean isAssignableOld(Class<?> lhsType, Class<?> rhsType) {
        if (lhsType == null) {
            return false;
        }
        if (rhsType == null) {
            return !lhsType.isPrimitive();
        }

        if (lhsType.isPrimitive() && rhsType.isPrimitive()) {
            if (lhsType == rhsType) {
                return true;
            }

            if ((rhsType == Byte.TYPE) && (lhsType == Short.TYPE || lhsType == Integer.TYPE || lhsType == Long.TYPE
                || lhsType == Float.TYPE || lhsType == Double.TYPE)) {
                return true;
            }

            if ((rhsType == Short.TYPE) && (lhsType == Integer.TYPE || lhsType == Long.TYPE || lhsType == Float.TYPE
                || lhsType == Double.TYPE)) {
                return true;
            }

            if ((rhsType == Character.TYPE) && (lhsType == Integer.TYPE || lhsType == Long.TYPE || lhsType == Float.TYPE
                || lhsType == Double.TYPE)) {
                return true;
            }

            if ((rhsType == Integer.TYPE) && (lhsType == Long.TYPE || lhsType == Float.TYPE
                || lhsType == Double.TYPE)) {
                return true;
            }

            if ((rhsType == Long.TYPE) && (lhsType == Float.TYPE || lhsType == Double.TYPE)) {
                return true;
            }

            return (rhsType == Float.TYPE) && (lhsType == Double.TYPE);
        } else {
            return lhsType.isAssignableFrom(rhsType);
        }
    }