Repository: netty/netty
File: codec-http3/src/main/java/io/netty/handler/codec/http3/Http3Headers.java (Java)

Code before:
    /**
     * Gets the {@link PseudoHeaderName#PATH} header or {@code null} if there is no such header
     *
     * @return the value of the header.
     */
    @Nullable
    CharSequence path();

    /**
     * Gets the {@link PseudoHeaderName#STATUS} header or {@code null} if there is no such header
     *
     * @return the value of the header.
     */
    @Nullable
    CharSequence status();

    /**
     * Gets the {@link PseudoHeaderName#PROTOCOL} header or {@code null} if there is no such header
     * <p>
     * This pseudo-header is used for Extended CONNECT requests as defined in RFC 9220.
     *
     * @return the value of the header.
     * @see <a href="https://www.rfc-editor.org/rfc/rfc9220.html">RFC 9220: Bootstrapping WebSockets with HTTP/3</a>
     */
    @Nullable
    CharSequence protocol();

    /**
     * Returns {@code true} if a header with the {@code name} and {@code value} exists, {@code false} otherwise.
     * <p>
     * If {@code caseInsensitive} is {@code true} then a case insensitive compare is done on the value.
     *
     * @param name              the name of the header to find
     * @param value             the value of the header to find
     * @param caseInsensitive   {@code true} then a case insensitive compare is run to compare values.
     * otherwise a case sensitive compare is run to compare values.
     * @return                  {@code true} if its contained, {@code false} otherwise.
     */
    boolean contains(CharSequence name, CharSequence value, boolean caseInsensitive);
}


Review comment (suggestion):
```suggestion
    default CharSequence protocol() {
        return get(PseudoHeaderName.PROTOCOL.value());
    }
```

Code after:
    @Nullable
    CharSequence authority();

    /**
     * Gets the {@link PseudoHeaderName#PATH} header or {@code null} if there is no such header
     *
     * @return the value of the header.
     */
    @Nullable
    CharSequence path();

    /**
     * Gets the {@link PseudoHeaderName#STATUS} header or {@code null} if there is no such header
     *
     * @return the value of the header.
     */
    @Nullable
    CharSequence status();

    /**
     * Gets the {@link PseudoHeaderName#PROTOCOL} header or {@code null} if there is no such header
     * <p>
     * This pseudo-header is used for Extended CONNECT requests as defined in RFC 9220.
     *
     * @return the value of the header.
     * @see <a href="https://www.rfc-editor.org/rfc/rfc9220.html">RFC 9220: Bootstrapping WebSockets with HTTP/3</a>
     */
    @Nullable
    default CharSequence protocol() {
        return get(PseudoHeaderName.PROTOCOL.value());
    }

    /**
     * Returns {@code true} if a header with the {@code name} and {@code value} exists, {@code false} otherwise.
     * <p>
     * If {@code caseInsensitive} is {@code true} then a case insensitive compare is done on the value.
     *
     * @param name              the name of the header to find
     * @param value             the value of the header to find
     * @param caseInsensitive   {@code true} then a case insensitive compare is run to compare values.
     * otherwise a case sensitive compare is run to compare values.
     * @return                  {@code true} if its contained, {@code false} otherwise.
     */
    boolean contains(CharSequence name, CharSequence value, boolean caseInsensitive);
}