code: public static Class<?> findCommonBaseClass(Class<?> a, Class<?> b) {
          Class<?> clazz = findCommonBaseClass0(a, b);
  
          if (clazz != null && clazz.isInterface()) {
              // Only return interface if it actually defines something.
              if (clazz.getMethods().length <= 0) {
                  //clazz = Object.class;
              }
          }
  
          return clazz;
      }
docs: Returns the most specific common superclass or interface that can be
  used to represent both of the specified classes. Null is only returned
  if either class refers to a primitive type and isn't the same as the
  other class.