He-Pin opened a new pull request, #3387: URL: https://github.com/apache/pekko/pull/3387
### Motivation Java does not support multiple inheritance or trait mixin, so users cannot combine `AbstractActorWithStash` / `AbstractActorWithTimers` with `ActorLogging`. This forces Java users to manually implement logging boilerplate when they need both stash/timer support and logging. Closes #2520. ### Modification Add 8 new abstract base classes that combine `ActorLogging` with each stash and timer variant: **Stash + Logging** (`AbstractActor.scala`): - `AbstractLoggingActorWithStash` / `UntypedAbstractLoggingActorWithStash` - `AbstractLoggingActorWithUnboundedStash` / `UntypedAbstractLoggingActorWithUnboundedStash` - `AbstractLoggingActorWithUnrestrictedStash` / `UntypedAbstractLoggingActorWithUnrestrictedStash` **Timers + Logging** (`Timers.scala`): - `AbstractLoggingActorWithTimers` / `UntypedAbstractLoggingActorWithTimers` ### Result Java users can now extend a single base class to get both stash/timer support and logging, matching the convenience Scala users get via trait mixin. ### Tests - `sbt "actor-tests / Test / testOnly org.apache.pekko.actor.LoggingVariantActorsTest"` — Passed: Total 9, Failed 0, Errors 0, Passed 9 - `sbt "actor / mimaReportBinaryIssues"` — success (pure additions, no binary compatibility impact) - `scalafmt --mode diff-ref=origin/main` — no formatting issues - `git diff --check` — clean ### References Fixes #2520 -- 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]
