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

Code before:
         *                 constructor. If {@code false} the user will need to call {@link #register()}.
         * @return This builder
         */
        public Builder register(boolean register) {
            this.register = register;
            return this;
        }

        /**
         * {@code false} if this {@link Channel} will delegate {@link #disconnect()} to {@link #close()}, {@code true}
         * 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");
            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");

Review comment (suggestion):
```suggestion
            this.handler = null;
            return this;
```

To make sure the array path is used

Code after:
            return this;
        }

        /**
         * {@code false} if this {@link Channel} will delegate {@link #disconnect()} to {@link #close()}, {@code true}
         * 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");
            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;
        }