vert-x3 / vertx-lang-kotlin

Vert.x for Kotlin
Apache License 2.0
296 stars 68 forks source link

Disambiguate toChannel() name clash #134

Closed bergmanngabor closed 3 years ago

bergmanngabor commented 5 years ago

The extension functions ReadStream<T>.toChannel(vertx) and WriteStream<T>.toChannel(vertx) (note the omission of the optional capacity parameter) are in a name clash for receiver classes that are both Read+Write streams (notably AsyncFile).

They can be disambiguated by, for instance, renaming them to ReadStream<T>.toReceiveChannel(vertx: Vertx) and WriteStream<T>.toSendChannel(vertx: Vertx), respectively.

gmariotti commented 5 years ago

I wasn't aware of this case. I think we can probably do it by deprecating with a warning the old methods and remove them in Vert.x 4. Would do you like to open a PR for it?