code: public static Class<?> commonType(Class<?> baseType, Object fromValue, IntSupplier length) {
          if ( Object.class != baseType )
              return baseType;
          Class<?> common = null;
          int len = length.getAsInt();
          for (int i = 0; i < len; i++)
              if ( Object.class == (common = Types.getCommonType(common,
                      Types.getType(Array.get(fromValue, 0)))) )
                  break;
          if ( null != common && common != baseType )
              return common;
          return baseType;
      }
docs: Find a more specific type if the element type is Object.class.
  @param baseType the element type
  @param fromValue the array to inspect
  @param length the length of the array
  @return baseType unless baseType is Object.class and common is not