SollmoStudio / beyond

Beyond: The Scalable Game Server Framework
http://www.beyondframework.com
Apache License 2.0
25 stars 9 forks source link

Use Actor.emptyBehavior instead of Map.empty for Actor receiver. #197

Closed sgkim126 closed 9 years ago

sgkim126 commented 9 years ago

Actor.emptyBehavior do simple and is more expresive than Map.empty.

hatashiro commented 9 years ago

The patch itself looks good, but can you explain what it means for me as I've no idea about this stuff? Anyway, you can merge this right away.

sgkim126 commented 9 years ago

Using Actor.emptyBehavior is more recommended way. Map.empty throws NoSuchElementException but Actor.emptyBehavior throws UnsupportedOperationException, and Actor.emptyBehavior throws exception immediately until Map.empty calls more fuction internally before throw excption.

hatashiro commented 9 years ago

Thanks.