Search code examples
hapi-fhirapache-commons-lang3

Is commons-lang3 3.4 backward compatible respect to 3.1


I have a maven project with many dependencies, two of them primefaces-extensions and hapi-fhir-base, both of them needs commons-lang3, but primefaces declares version 3.1 as dependency, but hapi needs >= 3.2. Is safe to assume that commons-lang3 3.4 will be fine for primefaces if it declares 3.1 as dependency version ?


Solution

  • See the release notes:

    For 3.4 compatibility to 3.3.x:

    Commons Lang 3.4 is fully binary compatible to the last release and can therefore be used as a drop in replacement for 3.3.2.

    For 3.3.x to 3.1:

    This release introduces backwards incompatible changes in org.apache.commons.lang3.time.FastDateFormat:

    Method 'protected java.util.List parsePattern()' has been removed

    Method 'protected java.lang.String parseToken(java.lang.String, int[])' has been removed

    Method 'protected org.apache.commons.lang3.time.FastDateFormat$NumberRule. selectNumberRule(int, int)' has been removed

    These changes were the result of [LANG-462]. It is assumed that this change will not break clients

    So it should work, as long as the changes in FastDateFormat are not breaking your code, which the developers think should not be possible.