akka/akka-http

Java DSL methods on ws.Message should be hidden from Scala

开放

#927 创建于 2017年3月5日

 (1 条评论) (0 个反应) (0 位负责人)Scala (598 个派生)batch import
1 - triagedhelp wantedt:coret:java

仓库指标

星标
 (1,311 个星标)
PR 合并指标
 (平均合并 1天 10小时) (30 天内合并 2 个 PR)

描述

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.

贡献者指南