Java DSL methods on ws.Message should be hidden from Scala
#927 ouverte le 5 mars 2017
Métriques du dépôt
- Stars
- (1 311 étoiles)
- Métriques de merge PR
- (Merge moyen 1j 10h) (2 PRs mergées en 30 j)
Description
The Scala DSL requires pattern matching to deal with TextMessage vs. BinaryMessage. Calling the content-assisted options leads to the Java side of things with mystifying error messages and lots of head scratching (e.g. folding over the stream with Scala 2.11 and being told that Function2 is expected where I am clearly supplying a 2-ary lambda expression).
The Java DSL methods are just misleading and should not show up on the Scala type. This can be achieved by making them private[akka], which translates to public for Java and is binary compatible.
It might be desirable to either document this better or add methods for the Scala DSL as well.