The crash one sees when putting Guava 21 on the classpath is the following:
java.lang.NoSuchMethodError: com.google.common.base.Objects.firstNonNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
at com.github.fge.jackson.JsonLoader.fromResource(JsonLoader.java:83
....
Guava 21 is appealing because it adds a number of very useful utilities for working with Java 8. However in this release, they have (after a period of planned deprecation) removed methods from their Objects class (due to Java 8 containing an Objects class).
I understand jackson-coreutils may wish to retain support for Java 6. Fortunately, Guava planned ahead and there is a window of cross-over:
A solution may be for jackson-coreutils to depend on Guava 18, 19 or 20. These all contain the class MoreObjects as a duplicate of Objects from Guava 16. So it may just be a matter of bumping the Guava version and substituting Objects with MoreObjects. Upstream code can then use Guava 21+ (which still contains these methods in MoreObjects)
An alternative might be to just inline the calls to the utility functions in Objects, if they are not used too frequently.
Related:
The crash one sees when putting Guava 21 on the classpath is the following:
Guava 21 is appealing because it adds a number of very useful utilities for working with Java 8. However in this release, they have (after a period of planned deprecation) removed methods from their
Objectsclass (due to Java 8 containing anObjectsclass).I understand
jackson-coreutilsmay wish to retain support for Java 6. Fortunately, Guava planned ahead and there is a window of cross-over:A solution may be for jackson-coreutils to depend on Guava 18, 19 or 20. These all contain the class
MoreObjectsas a duplicate ofObjectsfrom Guava 16. So it may just be a matter of bumping the Guava version and substitutingObjectswithMoreObjects. Upstream code can then use Guava 21+ (which still contains these methods inMoreObjects)An alternative might be to just inline the calls to the utility functions in
Objects, if they are not used too frequently.Related: