Replace java.util.Set#removeAll(java.util.Collection) with java.util.Collection#forEach(Set::remove)

MSAL

Using java.util.Collection#forEach(Set::remove) rather than java.util.Set#removeAll(java.util.Collection) may improve performance due to a possible O(n^2) complexity.

org.openrewrite.staticanalysis.UseForEachRemoveInsteadOfSetRemoveAll
mod run . --recipe=org.openrewrite.staticanalysis.UseForEachRemoveInsteadOfSetRemoveAll

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