Posted about 3 years ago. Visible to the public.

Akka, scala and wartremover: Inferred type containing Any on Receive method

If you're using the fabulous wartremover to keep your code cleaner and are using akka too then you might have stumpled upon the following warning from wartremover:

Copy
Inferred type containing Any override def receive: Receive = { ^

To suppress the warning you can either turn off the "wart" completely but it is better to simply annotate the receive method of your actors like this:

Copy
@SuppressWarnings(Array("org.wartremover.warts.Any")) override def receive: Receive = { ... }

Owner of this card:

Avatar
jan0sch
Last edit:
over 1 year ago
by jan0sch
Posted by jan0sch to jan0sch's deck
This website uses cookies to improve usability and analyze traffic.
Accept or learn more