I disagree, I think that using null for a callback would be what a user expects. 

If a user passes in null it is quite clear what their intention is, throwing an exception and forcing them to use a noop callback does not seem like very friendly behaviour. 

Norman Maurer wrote:
> In 
> websockets/src/main/java/io/undertow/websockets/highlevel/SendCallback.java:
>
> >  + * See the License for the specific language governing permissions and
> >  + * limitations under the License.
> >  + */
> >  +package io.undertow.websockets.highlevel;
> >  +
> >  +/**
> >  + * Callback which will be called once a send operation completes. This may successfully or because of an error.
> >  + *
> >  + * @author<a href="mailto:nmaurer@redhat.com">Norman Maurer</a>
> >  + */
> >  +public interface SendCallback {
> >  +
> >  +    /**
> >  +     * {@link SendCallback} which can be used for a send operation for which you are not interested in the result.
> >  +     */
> >  +    SendCallback NOOP = new SendCallback() {
>
> I prefer the usage of a NOOP because passing in nulls feels like flaws 
> often and raise the danger of NPE's. The static NOOP is cheap so I 
> would prefer it.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/undertow-io/undertow/pull/33/files#r2839166>.
>