fix eventbus doc-code (#21189)
remove `new AnyRef`
before:
```
new AnyRef {
class Listener extends Actor {
def receive = {
case m: Jazz => println(s"${self.path.name} is listening to: ${m.artist}")
case m: Electronic => println(s"${self.path.name} is listening to: ${m.artist}")
}
}
```
after:
```
class Listener extends Actor {
def receive = {
case m: Jazz => println(s"${self.path.name} is listening to: ${m.artist}")
case m: Electronic => println(s"${self.path.name} is listening to: ${m.artist}")
}
}
```
This commit is contained in:
parent
3e2bdb55a3
commit
1cb088ed81
1 changed files with 5 additions and 4 deletions
|
|
@ -152,12 +152,13 @@ class LoggingDocSpec extends AkkaSpec {
|
|||
|
||||
"demonstrate superclass subscriptions on eventStream" in {
|
||||
def println(s: String) = ()
|
||||
//#superclass-subscription-eventstream
|
||||
abstract class AllKindsOfMusic { def artist: String }
|
||||
case class Jazz(artist: String) extends AllKindsOfMusic
|
||||
case class Electronic(artist: String) extends AllKindsOfMusic
|
||||
|
||||
new AnyRef {
|
||||
//#superclass-subscription-eventstream
|
||||
abstract class AllKindsOfMusic { def artist: String }
|
||||
case class Jazz(artist: String) extends AllKindsOfMusic
|
||||
case class Electronic(artist: String) extends AllKindsOfMusic
|
||||
|
||||
class Listener extends Actor {
|
||||
def receive = {
|
||||
case m: Jazz => println(s"${self.path.name} is listening to: ${m.artist}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue