Skip to content

Instantly share code, notes, and snippets.

@trustin
Created July 4, 2012 04:25
Show Gist options
  • Save trustin/3045309 to your computer and use it in GitHub Desktop.
Save trustin/3045309 to your computer and use it in GitHub Desktop.
ChannelConfig cfg = ...;
// Before:
cfg.setOption("tcpNoDelay", true);
cfg.setOption("tcpNoDelay", 0); // Runtime ClassCastException
cfg.setOption("tcpNoDelays", true); // Typo in the option name - ignored silently
// After:
cfg.setOption(ChannelOption.TCP_NODELAY, true);
cfg.setOption(ChannelOption.TCP_NODELAY, 0); // Compile error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment