Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Http2Headers pseudoheader setting methods incorrectly documented #8068

Closed
mosesn opened this issue Jun 27, 2018 · 5 comments · Fixed by #9718
Closed

Http2Headers pseudoheader setting methods incorrectly documented #8068

mosesn opened this issue Jun 27, 2018 · 5 comments · Fixed by #9718
Assignees
Milestone

Comments

@mosesn
Copy link
Contributor

mosesn commented Jun 27, 2018

Here in the docs it says the setter sets the header conditionally, but it seems to actually be unconditional.

Docs:

    /**
     * Sets the {@link PseudoHeaderName#METHOD} header or {@code null} if there is no such header
     */
    Http2Headers method(CharSequence value);

Implementation:

    @Override
    public Http2Headers method(CharSequence value) {
        set(PseudoHeaderName.METHOD.value(), value);
        return this;
    }

One of these is wrong, but I don't know which one it is.

@normanmaurer
Copy link
Member

@Scottmitch @trustin thoughts ?

@normanmaurer
Copy link
Member

@carl-mastrangelo
Copy link
Member

Looks like a typo. The blame line shows that being present for a while. I'm not sure what the docs mean: Does it clear the header if it doesnt exist? Does it clear it if it doesn't apply (such as in a response header)? I would support making the doc take no position on the matter.

@ejona86
Copy link
Member

ejona86 commented Oct 15, 2018

The doc does seem wrong. Null doesn't even make sense in that context. Seems it should be "Sets the {@link PseudoHeaderName#METHOD} header".

@normanmaurer
Copy link
Member

@ejona86 want to do a PR ?

@normanmaurer normanmaurer added this to the 4.1.44.Final milestone Oct 28, 2019
normanmaurer added a commit that referenced this issue Oct 28, 2019
Motivation:

The javadocs of Http2Headers.method(...) are incorrect, we should fix these.

Modifications:

Correct javadocs

Result:

Fixes #8068.
normanmaurer added a commit that referenced this issue Oct 29, 2019
Motivation:

The javadocs of Http2Headers.method(...) are incorrect, we should fix these.

Modifications:

Correct javadocs

Result:

Fixes #8068.
normanmaurer added a commit that referenced this issue Oct 29, 2019
Motivation:

The javadocs of Http2Headers.method(...) are incorrect, we should fix these.

Modifications:

Correct javadocs

Result:

Fixes #8068.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants