Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is guava binary compatible with previous versions?

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?

like image 895
Rumca Avatar asked Feb 18 '14 22:02

Rumca


People also ask

Is Google guava backwards compatible?

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.

Is JVM backwards compatible?

But the JVM is backwards compatible, as it can run older bytecodes.

How do I know my guava version?

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.

What is guava JRE version?

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.


2 Answers

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.

enter image description here

like image 93
linuxbuild Avatar answered Oct 24 '22 17:10

linuxbuild


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.

like image 20
Kevin Bourrillion Avatar answered Oct 24 '22 17:10

Kevin Bourrillion