code: static <T> boolean setOption(Channel jdkChannel, NioChannelOption<T> option, T value) {
          java.nio.channels.NetworkChannel channel = (java.nio.channels.NetworkChannel) jdkChannel;
          if (!channel.supportedOptions().contains(option.option)) {
              return false;
          }
          if (channel instanceof ServerSocketChannel && option.option == java.net.StandardSocketOptions.IP_TOS) {
              // Skip IP_TOS as a workaround for a JDK bug:
              // See http://mail.openjdk.java.net/pipermail/nio-dev/2018-August/005365.html
              return false;
          }
          try {
              channel.setOption(option.option, value);
              return true;
          } catch (IOException e) {
              throw new ChannelException(e);
          }
      }
docs: Internal helper methods to remove code duplication between Nio*Channel implementations.