openrewrite / rewrite-apache

OpenRewrite recipes for Apache projects.
Apache License 2.0
2 stars 8 forks source link

Apache collections: migrate from `cardinality(O obj, Iterable<? super O> coll)` to `IterableUtils.frequency(Iterable, Object)` #37

Open yeikel opened 2 years ago

yeikel commented 2 years ago

cardinality(O obj, Iterable<? super O> coll)

Deprecated. since 4.1, use IterableUtils.frequency(Iterable, Object) instead. Be aware that the order of parameters has changed.

https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/CollectionUtils.html#cardinality-O-java.lang.Iterable-

pway99 commented 2 years ago

It may be possible to configure a declarative recipe for this migration.

These may help ReorderMethodArguments, ChangeType, ChangeMethodTargetToStatic