Repository: netty/netty
File: handler/src/main/java/io/netty/handler/ssl/util/SelfSignedCertificate.java (Java)

Code before:
            this.random = random;
            return this;
        }

        /**
         * Set the key size.
         *
         * @param bits The key size
         * @return This builder
         */
        public Builder bits(int bits) {
            this.bits = bits;
            return this;
        }

        /**
         * Set the start of the certificate validity period.
         *
         * @param notBefore The start date
         * @return This builder
         */
        public Builder notBefore(Date notBefore) {
            ObjectUtil.checkNotNullWithIAE(notBefore, "notBefore");
            this.notBefore = notBefore;
            return this;
        }

        /**
         * Set the end of the certificate validity period.
         *
         * @param notAfter The start date
         * @return This builder
         */
        public Builder notAfter(Date notAfter) {
            ObjectUtil.checkNotNullWithIAE(notAfter, "notAfter");
            this.notAfter = notAfter;
            return this;
        }

        /**
         * Set the key algorithm. Only RSA and EC are supported.
         *
         * @param algorithm The key algorithm
         * @return This builder
         */
        public Builder algorithm(String algorithm) {
            if ("EC".equalsIgnoreCase(algorithm)) {
                this.algorithm = "EC";
            } else if ("RSA".equalsIgnoreCase(algorithm)) {
                this.algorithm = "RSA";
            } else {

Review comment (suggestion):
```suggestion
        public Builder notBefore(Date notBefore) {
            this.notBefore = ObjectUtil.checkNotNullWithIAE(notBefore, "notBefore");
            return this;
        }
```

Code after:
            return this;
        }

        /**
         * Set the key size.
         *
         * @param bits The key size
         * @return This builder
         */
        public Builder bits(int bits) {
            this.bits = bits;
            return this;
        }

        /**
         * Set the start of the certificate validity period.
         *
         * @param notBefore The start date
         * @return This builder
         */
        public Builder notBefore(Date notBefore) {
            this.notBefore = ObjectUtil.checkNotNullWithIAE(notBefore, "notBefore");
            return this;
        }

        /**
         * Set the end of the certificate validity period.
         *
         * @param notAfter The start date
         * @return This builder
         */
        public Builder notAfter(Date notAfter) {
            this.notAfter = ObjectUtil.checkNotNullWithIAE(notAfter, "notAfter");
            return this;
        }

        /**
         * Set the key algorithm. Only RSA and EC are supported.
         *
         * @param algorithm The key algorithm
         * @return This builder
         */
        public Builder algorithm(String algorithm) {
            if ("EC".equalsIgnoreCase(algorithm)) {
                this.algorithm = "EC";
            } else if ("RSA".equalsIgnoreCase(algorithm)) {
                this.algorithm = "RSA";
            } else {
                throw new IllegalArgumentException("Algorithm not valid: " + algorithm);
            }
            return this;