He-Pin opened a new pull request, #3379: URL: https://github.com/apache/pekko/pull/3379
### Motivation Now that Scala 2.12 support has been dropped (#2201), we can use SAM (Single Abstract Method) conversion to replace verbose anonymous inner classes with concise lambda expressions across the codebase. ### Modification Replace anonymous inner classes with lambda expressions for SAM types including `Runnable`, `Callable`, `Consumer`, `Comparator`, `Ordering`, `Predicate`, `BiFunction`, `JFunction`, `JPredicate`, and `LongFunction` across 24 files in actor, actor-typed, persistence, persistence-typed, remote, cluster, cluster-sharding, cluster-typed, coordination, and discovery modules. Remove unused imports that are no longer needed after the conversion. ### Result Cleaner, more idiomatic Scala 2.13+ code with ~115 fewer lines while maintaining identical runtime behavior. ### Tests - `sbt actor/compile actor-typed/compile persistence/compile persistence-typed/compile remote/compile cluster/compile cluster-sharding/compile cluster-typed/compile cluster-sharding-typed/compile coordination/compile discovery/compile` — all pass - `sbt "actor-tests/testOnly org.apache.pekko.pattern.CircuitBreakerSpec"` — 63 passed - `sbt "actor-tests/testOnly org.apache.pekko.event.*"` — 88 passed - `sbt "persistence-typed-tests/testOnly org.apache.pekko.persistence.typed.javadsl.EventSourcedBehaviorJavaDslTest"` — 15 passed ### References Fixes #2201 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
