Prefer new LinkedHashSet<>()

MSAL

Prefer the Java standard library over third-party usage of Guava in simple cases like this.

org.openrewrite.java.migrate.guava.NoGuavaSetsNewLinkedHashSet
mod run . --recipe=org.openrewrite.java.migrate.guava.NoGuavaSetsNewLinkedHashSet

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. Prefer new LinkedHashSet<>()
  2. Prefer new LinkedHashSet<>(Collection)
  3. Prefer new LinkedHashSet<>(int)