Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yeikel opened this issue Apr 19, 2022 · 1 comment
Labels

Comments

@yeikel
Copy link

yeikel commented Apr 19, 2022

cardinality(O objIterable<? super Ocoll)

Deprecatedsince 4.1, use IterableUtils.frequency(Iterable, Objectinstead. 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-

@yeikel yeikel changed the title Apache collection: migrate from cardinality(O obj, Iterable<? super O> coll) to IterableUtils.frequency(Iterable, Object) Apache collections: migrate from cardinality(O obj, Iterable<? super O> coll) to IterableUtils.frequency(Iterable, Object) Apr 19, 2022
@pway99
Copy link
Contributor

pway99 commented Apr 19, 2022

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

These may help
ReorderMethodArguments, ChangeType, ChangeMethodTargetToStatic

@pway99 pway99 added the enhancement New feature or request label Apr 19, 2022
@tkvangorder tkvangorder added recipe and removed enhancement New feature or request labels Apr 19, 2022
@timtebeek timtebeek transferred this issue from openrewrite/rewrite-migrate-java Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Recipes Wanted
Development

No branches or pull requests

3 participants