Skip to content

Refactorings

David P. Baker edited this page May 17, 2021 · 6 revisions

Refactorings

Guava, as a library, deprecates APIs with noticeable frequency, though we no longer delete APIs not annotated @Beta. Inside Google, we deprecate and delete APIs much more aggressively, which we can make work because we have infrastructure in place to refactor the entire Google codebase away from APIs we wish to eliminate. (Some background about this infrastructure can be found here.)

To reduce the pain of upgrading versions of Guava, and to help users migrate away from APIs we consider deprecated, we are experimenting with releasing some of our internal refactorings. Currently, these refactorings use Refaster, a refactoring tool we developed to refactor based on simple, before-and-after code examples in Java.

Currently, Refaster is released as part of Google's Java compiler tools project, Error Prone. Our external support for Refaster is still somewhat experimental, but we hope you'll be interested in experimenting with it. The documentation can be found here. The refactorings released with Guava should be applicable by directly following those instructions.

This is an experiment, and we hope you will find it useful. If these refactorings work for you — or if they don't! — please let us know.

Clone this wiki locally