Migrates to Apache Commons Collections 4.x

MSAL

Migrate applications to the latest Apache Commons Collections 4.x release. This recipe modifies application's build files, make changes to deprecated/preferred APIs, and migrates configuration settings that have changes between versions.

org.openrewrite.apache.commons.collections.UpgradeApacheCommonsCollections_3_4
mod run . --recipe=org.openrewrite.apache.commons.collections.UpgradeApacheCommonsCollections_3_4

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Change Gradle or Maven dependency commons-collections:commons-collections
  2. Add Gradle or Maven dependency org.apache.commons:commons-collections4:4.x
  3. Change type IdentityMap to IdentityHashMap
  4. Delete method argument 0 in methods org.apache.commons.collections.FastArrayList <constructor>(int)
  5. Remove method invocations org.apache.commons.collections.FastArrayList setFast(boolean)
  6. Change type FastArrayList to CopyOnWriteArrayList
  7. Change static field access to static method access MapUtils#EMPTY_MAP to emptyMap
  8. Change static field access to static method access ListUtils#EMPTY_LIST to emptyList
  9. Change static field access to static method access SetUtils#EMPTY_SET to emptySet
  10. Change method name org.apache.commons.collections.OrderedMap orderedMapIterator() to mapIterator
  11. Change method name org.apache.commons.collections.OrderedBidiMap inverseOrderedBidiMap() to inverseBidiMap
  12. Replace constant with another constant
  13. Replace constant with another constant
  14. Replace constant with another constant
  15. Replace constant with another constant
  16. Replace constant with another constant
  17. Replace constant with another constant
  18. Change method name org.apache.commons.collections.set.SynchronizedSet decorate(java.util.Set) to synchronizedSet
  19. Change method target to static
  20. Change method name org.apache.commons.collections.set.SynchronizedSortedSet decorate(java.util.SortedSet) to synchronizedSortedSet
  21. Change method target to static
  22. Change method name org.apache.commons.collections.list.SynchronizedList decorate(java.util.List) to synchronizedList
  23. Change method target to static
  24. Change method name org.apache.commons.collections.bag.PredicatedBag decorate(..) to predicatedBag
  25. Change method name org.apache.commons.collections.bag.PredicatedSortedBag decorate(..) to predicatedSortedBag
  26. Change method name org.apache.commons.collections.bag.SynchronizedBag decorate(..) to synchronizedBag
  27. Change method name org.apache.commons.collections.bag.SynchronizedSortedBag decorate(..) to synchronizedSortedBag
  28. Change method name org.apache.commons.collections.bag.TransformedBag decorate(..) to transformingBag
  29. Change method name org.apache.commons.collections.bag.TransformedSortedBag decorate(..) to transformingSortedBag
  30. Change method name org.apache.commons.collections.bag.UnmodifiableBag decorate(..) to unmodifiableBag
  31. Change method name org.apache.commons.collections.bag.UnmodifiableSortedBag decorate(..) to unmodifiableSortedBag
  32. Change method name org.apache.commons.collections.bidimap.UnmodifiableBidiMap decorate(..) to unmodifiableBidiMap
  33. Change method name org.apache.commons.collections.bidimap.UnmodifiableOrderedBidiMap decorate(..) to unmodifiableOrderedBidiMap
  34. Change method name org.apache.commons.collections.bidimap.UnmodifiableSortedBidiMap decorate(..) to unmodifiableSortedBidiMap
  35. Change method name org.apache.commons.collections.collection.PredicatedCollection decorate(..) to predicatedCollection
  36. Change method name org.apache.commons.collections.collection.SynchronizedCollection decorate(..) to synchronizedCollection
  37. Change method name org.apache.commons.collections.collection.TransformedCollection decorate(..) to transformingCollection
  38. Change method name org.apache.commons.collections.collection.UnmodifiableBoundedCollection decorate(..) to unmodifiableBoundedCollection
  39. Change method name org.apache.commons.collections.collection.UnmodifiableCollection decorate(..) to unmodifiableCollection
  40. Change method name org.apache.commons.collections.comparators.ComparableComparator getInstance(..) to comparableComparator
  41. Change method name org.apache.commons.collections.functors.AllPredicate getInstance(..) to allPredicate
  42. Change method name org.apache.commons.collections.functors.AndPredicate getInstance(..) to andPredicate
  43. Change method name org.apache.commons.collections.functors.AnyPredicate getInstance(..) to anyPredicate
  44. Change method name org.apache.commons.collections.functors.ChainedClosure getInstance(..) to chainedClosure
  45. Change method name org.apache.commons.collections.functors.ChainedTransformer getInstance(..) to chainedTransformer
  46. Change method name org.apache.commons.collections.functors.CloneTransformer getInstance(..) to cloneTransformer
  47. Change method name org.apache.commons.collections.functors.ClosureTransformer getInstance(..) to closureTransformer
  48. Change method name org.apache.commons.collections.functors.ConstantFactory getInstance(..) to constantFactory
  49. Change method name org.apache.commons.collections.functors.ConstantTransformer getInstance(..) to constantTransformer
  50. Change method name org.apache.commons.collections.functors.EqualPredicate getInstance(..) to equalPredicate
  51. Change method name org.apache.commons.collections.functors.ExceptionClosure getInstance(..) to exceptionClosure
  52. Change method name org.apache.commons.collections.functors.ExceptionFactory getInstance(..) to exceptionFactory
  53. Change method name org.apache.commons.collections.functors.ExceptionPredicate getInstance(..) to exceptionPredicate
  54. Change method name org.apache.commons.collections.functors.ExceptionTransformer getInstance(..) to exceptionTransformer
  55. Change method name org.apache.commons.collections.functors.FactoryTransformer getInstance(..) to factoryTransformer
  56. Change method name org.apache.commons.collections.functors.FalsePredicate getInstance(..) to falsePredicate
  57. Change method name org.apache.commons.collections.functors.ForClosure getInstance(..) to forClosure
  58. Change method name org.apache.commons.collections.functors.IdentityPredicate getInstance(..) to identityPredicate
  59. Change method name org.apache.commons.collections.functors.IfClosure getInstance(..) to ifClosure
  60. Change method name org.apache.commons.collections.functors.InstanceofPredicate getInstance(..) to instanceOfPredicate
  61. Change method name org.apache.commons.collections.functors.InstantiateFactory getInstance(..) to instantiateFactory
  62. Change method name org.apache.commons.collections.functors.InstantiateTransformer getInstance(..) to instantiateTransformer
  63. Change method name org.apache.commons.collections.functors.InvokerTransformer getInstance(..) to invokerTransformer
  64. Change method name org.apache.commons.collections.functors.MapTransformer getInstance(..) to mapTransformer
  65. Change method name org.apache.commons.collections.functors.NOPClosure getInstance(..) to nopClosure
  66. Change method name org.apache.commons.collections.functors.NOPTransformer getInstance(..) to nopTransformer
  67. Change method name org.apache.commons.collections.functors.NonePredicate getInstance(..) to nonePredicate
  68. Change method name org.apache.commons.collections.functors.NotNullPredicate getInstance(..) to notNullPredicate
  69. Change method name org.apache.commons.collections.functors.NotPredicate getInstance(..) to notPredicate
  70. Change method name org.apache.commons.collections.functors.NullIsExceptionPredicate getInstance(..) to nullIsExceptionPredicate
  71. Change method name org.apache.commons.collections.functors.NullIsFalsePredicate getInstance(..) to nullIsFalsePredicate
  72. Change method name org.apache.commons.collections.functors.NullIsTruePredicate getInstance(..) to nullIsTruePredicate
  73. Change method name org.apache.commons.collections.functors.NullPredicate getInstance(..) to nullPredicate
  74. Change method name org.apache.commons.collections.functors.OnePredicate getInstance(..) to onePredicate
  75. Change method name org.apache.commons.collections.functors.OrPredicate getInstance(..) to orPredicate
  76. Change method name org.apache.commons.collections.functors.PredicateTransformer getInstance(..) to predicateTransformer
  77. Change method name org.apache.commons.collections.functors.PrototypeFactory getInstance(..) to prototypeFactory
  78. Change method name org.apache.commons.collections.functors.StringValueTransformer getInstance(..) to stringValueTransformer
  79. Change method name org.apache.commons.collections.functors.SwitchClosure getInstance(..) to switchClosure
  80. Change method name org.apache.commons.collections.functors.SwitchTransformer getInstance(..) to switchTransformer
  81. Change method name org.apache.commons.collections.functors.TransformedPredicate getInstance(..) to transformedPredicate
  82. Change method name org.apache.commons.collections.functors.TransformerClosure getInstance(..) to transformerClosure
  83. Change method name org.apache.commons.collections.functors.TransformerPredicate getInstance(..) to transformerPredicate
  84. Change method name org.apache.commons.collections.functors.TruePredicate getInstance(..) to truePredicate
  85. Change method name org.apache.commons.collections.functors.UniquePredicate getInstance(..) to uniquePredicate
  86. Change method name org.apache.commons.collections.functors.WhileClosure getInstance(..) to whileClosure
  87. Change method name org.apache.commons.collections.iterators.UnmodifiableIterator decorate(..) to unmodifiableIterator
  88. Change method name org.apache.commons.collections.iterators.UnmodifiableListIterator decorate(..) to unmodifiableListIterator
  89. Change method name org.apache.commons.collections.iterators.UnmodifiableMapIterator decorate(..) to unmodifiableMapIterator
  90. Change method name org.apache.commons.collections.iterators.UnmodifiableOrderedMapIterator decorate(..) to unmodifiableOrderedMapIterator
  91. Change method name org.apache.commons.collections.list.FixedSizeList decorate(..) to fixedSizeList
  92. Change method name org.apache.commons.collections.list.GrowthList decorate(..) to growthList
  93. Change method name org.apache.commons.collections.list.LazyList decorate(..) to lazyList
  94. Change method name org.apache.commons.collections.list.PredicatedList decorate(..) to predicatedList
  95. Change method name org.apache.commons.collections.list.SetUniqueList decorate(..) to setUniqueList
  96. Change method name org.apache.commons.collections.list.TransformedList decorate(..) to transformingList
  97. Change method name org.apache.commons.collections.list.UnmodifiableList decorate(..) to unmodifiableList
  98. Change method name org.apache.commons.collections.map.DefaultedMap decorate(..) to defaultedMap
  99. Change method name org.apache.commons.collections.map.FixedSizeMap decorate(..) to fixedSizeMap
  100. Change method name org.apache.commons.collections.map.FixedSizeSortedMap decorate(..) to fixedSizeSortedMap
  101. Change method name org.apache.commons.collections.map.LazyMap decorate(..) to lazyMap
  102. Change method name org.apache.commons.collections.map.LazySortedMap decorate(..) to lazySortedMap
  103. Change method name org.apache.commons.collections.map.ListOrderedMap decorate(..) to listOrderedMap
  104. Change method name org.apache.commons.collections.map.MultiKeyMap decorate(..) to multiKeyMap
  105. Change method name org.apache.commons.collections.map.MultiValueMap decorate(..) to multiValueMap
  106. Change method name org.apache.commons.collections.map.PredicatedMap decorate(..) to predicatedMap
  107. Change method name org.apache.commons.collections.map.PredicatedSortedMap decorate(..) to predicatedSortedMap
  108. Change method name org.apache.commons.collections.map.TransformedMap decorate(..) to transformingMap
  109. Change method name org.apache.commons.collections.map.TransformedMap decorateTransform(..) to transformedMap
  110. Change method name org.apache.commons.collections.map.TransformedSortedMap decorate(..) to transformingSortedMap
  111. Change method name org.apache.commons.collections.map.TransformedSortedMap decorateTransform(..) to transformedSortedMap
  112. Change method name org.apache.commons.collections.map.UnmodifiableEntrySet decorate(..) to unmodifiableEntrySet
  113. Change method name org.apache.commons.collections.map.UnmodifiableMap decorate(..) to unmodifiableMap
  114. Change method name org.apache.commons.collections.map.UnmodifiableOrderedMap decorate(..) to unmodifiableOrderedMap
  115. Change method name org.apache.commons.collections.map.UnmodifiableSortedMap decorate(..) to unmodifiableSortedMap
  116. Change method name org.apache.commons.collections.set.ListOrderedSet decorate(..) to listOrderedSet
  117. Change method name org.apache.commons.collections.set.MapBackedSet decorate(..) to mapBackedSet
  118. Change method name org.apache.commons.collections.set.PredicatedSet decorate(..) to predicatedSet
  119. Change method name org.apache.commons.collections.set.PredicatedSortedSet decorate(..) to predicatedSortedSet
  120. Change method name org.apache.commons.collections.set.TransformedSet decorate(..) to transformingSet
  121. Change method name org.apache.commons.collections.set.TransformedSortedSet decorate(..) to transformingSortedSet
  122. Change method name org.apache.commons.collections.set.UnmodifiableSet decorate(..) to unmodifiableSet
  123. Change method name org.apache.commons.collections.set.UnmodifiableSortedSet decorate(..) to unmodifiableSortedSet
  124. Change type org.apache.commons.collections.DefaultMapEntry to org.apache.commons.collections4.keyvalue.DefaultMapEntry
  125. Change type org.apache.commons.collections.HashBag to org.apache.commons.collections4.bag.HashBag
  126. Change type org.apache.commons.collections.ReferenceMap to org.apache.commons.collections4.map.ReferenceMap
  127. Change type org.apache.commons.collections.StaticBucketMap to org.apache.commons.collections4.map.StaticBucketMap
  128. Change type org.apache.commons.collections.TreeBag to org.apache.commons.collections4.bag.TreeBag
  129. Rename package name org.apache.commons.collections to org.apache.commons.collections4