Repository: netty/netty
File: transport/src/main/java/io/netty/channel/embedded/EmbeddedChannel.java (Java)

Code before:
         * otherwise.
         *
         * @param hasDisconnect {@code false} if this {@link Channel} will delegate {@link #disconnect()} to
         *                      {@link #close()}, {@code true} otherwise
         * @return This builder
         */
        public Builder hasDisconnect(boolean hasDisconnect) {
            this.hasDisconnect = hasDisconnect;
            return this;
        }

        /**
         * The {@link ChannelHandler}s which will be added to the {@link ChannelPipeline}.
         *
         * @param handlers the {@link ChannelHandler}s which will be added to the {@link ChannelPipeline}
         * @return This builder
         */
        public Builder handlers(ChannelHandler... handlers) {
            this.handlers = Objects.requireNonNull(handlers, "handlers");
            this.handler = null;
            return this;
        }

        /**
         * The {@link ChannelHandler} which will be added to the {@link ChannelPipeline}.
         *
         * @param handler the {@link ChannelHandler}s which will be added to the {@link ChannelPipeline}
         * @return This builder
         */
        public Builder handlers(ChannelHandler handler) {
            this.handler = Objects.requireNonNull(handler, "handler");
            return this;
        }

        /**
         * The {@link ChannelConfig} which will be returned by {@link #config()}.
         *
         * @param config the {@link ChannelConfig} which will be returned by {@link #config()}
         * @return This builder
         */
        public Builder config(ChannelConfig config) {
            this.config = Objects.requireNonNull(config, "config");
            return this;
        }

        /**
         * Configure a custom ticker for this event loop.
         *
         * @param ticker The custom ticker
         * @return This builder
         */

Review comment (suggestion):
```suggestion
            this.handler = Objects.requireNonNull(handler, "handler");
            this.handlers = null;
```

Code after:
         */
        public Builder hasDisconnect(boolean hasDisconnect) {
            this.hasDisconnect = hasDisconnect;
            return this;
        }

        /**
         * The {@link ChannelHandler}s which will be added to the {@link ChannelPipeline}.
         *
         * @param handlers the {@link ChannelHandler}s which will be added to the {@link ChannelPipeline}
         * @return This builder
         */
        public Builder handlers(ChannelHandler... handlers) {
            this.handlers = Objects.requireNonNull(handlers, "handlers");
            this.handler = null;
            return this;
        }

        /**
         * The {@link ChannelHandler} which will be added to the {@link ChannelPipeline}.
         *
         * @param handler the {@link ChannelHandler}s which will be added to the {@link ChannelPipeline}
         * @return This builder
         */
        public Builder handlers(ChannelHandler handler) {
            this.handler = Objects.requireNonNull(handler, "handler");
            this.handlers = null;
            return this;
        }

        /**
         * The {@link ChannelConfig} which will be returned by {@link #config()}.
         *
         * @param config the {@link ChannelConfig} which will be returned by {@link #config()}
         * @return This builder
         */
        public Builder config(ChannelConfig config) {
            this.config = Objects.requireNonNull(config, "config");
            return this;
        }

        /**
         * Configure a custom ticker for this event loop.
         *
         * @param ticker The custom ticker
         * @return This builder
         */
        public Builder ticker(Ticker ticker) {
            this.ticker = ticker;
            return this;
        }