modernizer-maven-plugin icon indicating copy to clipboard operation
modernizer-maven-plugin copied to clipboard

Apache Commons Collections

Open rdifrango opened this issue 10 years ago • 5 comments

Should there be provisions in the configuration to look for usages from Apache Commons Collections, like functions, closures, etc.?

rdifrango avatar Jan 08 '15 15:01 rdifrango

@rdifrango Definitely! Could you submit a pull request for more Apache Commons checks? I only have a little familiarity with commons-collections since I mostly use Guava.

gaul avatar Jan 08 '15 19:01 gaul

@andrewgaul We use it sparingly as we've started to switch over to Guava, so I'll give it a shot.

rdifrango avatar Jan 09 '15 13:01 rdifrango

@rdifrango Switching to Guava is another interesting use case -- Modernizer could provide a second optional resource file to suggest Commons replacements. Modernizer only supports a single resource file now but supporting more is easy to add.

gaul avatar Jan 09 '15 16:01 gaul

+1 for the idea of generalizing the plugin to facilitate migrations from old lib X to newer lib Y (where in this case X = Apache Commons and Y is Guava). I guess X and Y could even be different versions of the same library. (Though that's a less useful scenario, provided the library maintainers mark methods with a more suitable replacement @Deprecated.)

Stephan202 avatar Jan 10 '15 15:01 Stephan202

For example, suggest replacing org.apache.commons.io.input.BoundedInputStream with com.google.common.io.ByteStreams.limit

gaul avatar Jun 23 '15 21:06 gaul