Posted about 4 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:

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:

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

Owner of this card:

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