private static List<Method> eliminateCovariantMethods(Method[] methodArray) {
    int methodCount = methodArray.length;
    Method[] sorted = methodArray.clone();
    Arrays.sort(sorted, METHOD_ORDER_COMPARATOR);
    Set<Method> overridden = OpenTypeUtil.newSet();

    for (int i = 1; i < methodCount; i++) {
      Method m0 = sorted[i - 1];
      Method m1 = sorted[i];

      if (!m0.getName().equals(m1.getName())) {
        continue;
      }

      if (Arrays.equals(m0.getParameterTypes(), m1.getParameterTypes())) {
        overridden.add(m0);
      }
    }

    List<Method> methods = OpenTypeUtil.newList(asList(methodArray));
    methods.removeAll(overridden);
    return methods;
  }
Eliminate methods that are overridden with a covariant return type. Reflection will return both
the original and the overriding method but we need only the overriding one is of interest

@return the method after eliminating covariant methods
geode-core/src/main/java/org/apache/geode/management/internal/MXBeanProxyInvocationHandler.java