Guava README says that @Beta
or deprecated that CAN be changed, removed etc. It does not say clearly whether all remaining classes are binary compatible with previous versions (or I misread it). Although I have feeling that it is backwards compatible when not stated otherwise.
My concern is that some other library might work against new guava version (and compile as well). But it also might rely on some buggy behavior that new version might have changed/fixed which cannot be detected easily. Can I safely upgrade?
Google Guava replaces and includes Google Collections plus many other important core libraries. It is a strict, backward-compatible superset of the Google Collections Library.
But the JVM is backwards compatible, as it can run older bytecodes.
You can get a version string from files under META-INF/ in the guava. jar. At runtime you'll need to use appropriate ClassLoader instance in order to load the META-INF/ files you want.
Guava provides two different "flavors": one for use on a (Java 8+) JRE and one for use on Android or by any library that wants to be compatible with Android. These flavors are specified in the Maven version field as either 31.1-jre or 31.1-android . For more about depending on Guava, see using Guava in your build.
I've prepared backward compatibility report for the Guava library versions here: http://abi-laboratory.pro/java/tracker/timeline/guava/
The report is generated by the japi-compliance-checker and japi-tracker tools.
We have steadfastly maintained binary and source compatibility for all non-@Beta APIs with every release, with the exception of removing methods that had been deprecated at least 18 months already.
We will continue this standard, although we are starting to acknowledge the possibility that the JDK 8 transition will give us unprecedented challenges in this regard, and it is possible we may be forced into a slightly-incompatible upgrade event in the future. I continue to hope it won't be necessary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With