@SuppressWarnings("PMD.EmptyCatchBlock") public static Integer getMethodOrder(Method method) { ThriftOrder order = method.getAnnotation(ThriftOrder.class); if (order == null) { try { Class<?> docsClass = getDriftMetaClassOf(method.getDeclaringClass()); order = docsClass.getDeclaredMethod(method.getName()).getAnnotation(ThriftOrder.class); } catch (ReflectiveOperationException e) { // ignored } } return order == null ? null : order.value(); }