Replace .last with .lastOption

Proprietary

Replaces .last calls on collections with .lastOption to avoid NoSuchElementException on empty collections.

org.openrewrite.scala.performance.UseLastOption
mod run . --recipe=org.openrewrite.scala.performance.UseLastOption

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