Replace removed Guava classes and methods by updated versions#17
Conversation
|
This looks good, although there may be consequences for down-stream codebases like Heritrix and Open/Wayback. Could @PsypherPunk and/or @kris-sigur have a quick look before we go ahead? |
|
Looking at the changes, none should affect any API calls. I'd suggest we keep OpenWayback dependent on a current version of webarchive-commons (i.e. still using 14.0.1—1.1.1?) until a post-2.0.0 release though. |
|
If you want to avoid a big jump in the Guava dependency version, it should also be fine to bump Guava just to 15.0 (all tests pass). Version 14.0.1 does not work unfortunately (InternetDomainName.name() was merged with .toString() in 15.0 and removed later, but the return value of .toString() in 14.0.1 is incompatible). |
|
Agree with @PsypherPunk. It all looks fine from an API standpoint and the changes in code seem to be the minimum required due to changes in Guava. If we're upgrading to a new version of Guava, we might as well go to the latest |
|
Yes, keeping our dependencies up to date is good Maven hygiene. Let's go ahead. |
Replace removed Guava classes and methods by updated versions
Several classes and methods have been deprecated and removed since Guava 14.0.1 (e.g. NullOutputStream, LimitInputStream and MapMaker.makeComputingMap). This prevents clients from updating to a newer version of Guava.
This change replaces all uses of removed Guava APIs by their documented alternatives and updates Guava to the current version (17.0).