netty5/transport
Bennett Lynch 5a725edf4a
[master] Allow and skip null handlers when adding a vararg list of handlers (#10776)
Allow and skip null handlers when adding a vararg list of handlers

Motivation

Allowing null handlers allows for more convenient idioms in
conditionally adding handlers, e.g.,

ch.pipeline().addLast(
        new FooHandler(),
        condition ? new BarHandler() : null,
        new BazHandler()
);

Modifications

* Change addFirst(..) and addLast(..) to skip null handlers, rather than
break or short-circuit.
* Add new unit tests.

Result

* Makes addFirst(..) and addLast(..) behavior more consistent
* Resolves https://github.com/netty/netty/issues/10728
2021-01-29 11:30:45 +01:00
..
src [master] Allow and skip null handlers when adding a vararg list of handlers (#10776) 2021-01-29 11:30:45 +01:00
pom.xml Use http in xmlns URIs to make maven release plugin happy again (#10788) 2020-11-10 10:51:05 +01:00