Skip to content

Instantly share code, notes, and snippets.

@fbettag
Created October 11, 2012 23:52
Show Gist options
  • Select an option

  • Save fbettag/3876463 to your computer and use it in GitHub Desktop.

Select an option

Save fbettag/3876463 to your computer and use it in GitHub Desktop.
weird netty issue
[error] Server.scala:55: type mismatch;
[error] found : io.netty.channel.ChannelOption[java.lang.Boolean]
[error] required: io.netty.channel.ChannelOption[Any]
[error] Note: java.lang.Boolean <: Any, but Java-defined class ChannelOption is invariant in type T.[error] You may wish to investigate a wildcard type such as `_ <: Any`. (SLS 3.2.10)
[error] .childOption(ChannelOption.TCP_NODELAY, true)
[error]
@jamalsa
Copy link
Copy Markdown

jamalsa commented Oct 31, 2012

You can solve it by:

.childOption(ChannelOption.TCP_NODELAY.asInstanceOf[ChannelOption[Any]], true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment