leventov commented on a change in pull request #6948: Add guava compatability
up to 27.0.1
URL: https://github.com/apache/incubator-druid/pull/6948#discussion_r253013521
##########
File path: core/src/main/java/org/apache/druid/common/guava/GuavaUtils.java
##########
@@ -62,4 +100,70 @@ public static Long tryParseLong(@Nullable String string)
return null;
}
+
+ /**
+ * Try the various methods (zero arguments) against the object. This is
handy for maintaining guava compatability
+ *
+ * @param object The object to call the methods on
+ * @param methods The sequence of methods to call
+ * @param <T> The return type
+ *
+ * @return The result of invoking the method on the object
+ */
+ private static <T> T tryMethods(Object object, Class<T> assignableTo,
String... methods)
Review comment:
Documentation should reference the specific commit and the range of lines
(as a Github link) in Guava from where this was copied. Same for other
non-trivial parts of the copied code.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]