The SaslImpl class adds a TransportWrapper that deals with processing the iincoming and outgoing sasl exchange work. When complete the wrapper leaves in place an implementation that must check on each new bit of work through the transport if it is still in Sasl mode and hand off to the next wrapper accordingly when not in Sasl. This checking can lead to a small loss in performance. Instead a wrapper that delegates to a swappable next instance can be switched once sasl is complete such that no checking is required after the sasl exchange.
As a side affect of this change the input and output buffers allocated to handle sasl bytes in the exchange can be moved to the delegate TransportWrapper that will be dropped after the exchange and that small bit of memory can be freed by a future GC.