Akka, scala and wartremover: Inferred type containing Any on Receive method
2016-05-10
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 = { ... }