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

HttpObjectEncoder#isContentAlwaysEmpty cannot be overridden by subclasses #6761

Closed
vietj opened this issue May 19, 2017 · 6 comments
Closed
Assignees
Milestone

Comments

@vietj
Copy link
Contributor

vietj commented May 19, 2017

Expected behavior

the HttpObjectEncoder#isContentAlwaysEmpty() method is package private, so subclasses can change its behavior. Currently Vert.x has a subclass extending HttpObjectEncoder .

Actual behavior

the HttpObjectEncoder#isContentAlwaysEmpty() method is package private

Steps to reproduce

n/a

Minimal yet complete reproducer code (or URL to code)

n/a

Netty version

4.1.8.Final

JVM version (e.g. java -version)

n/a

OS version (e.g. uname -a)

n/a

@normanmaurer
Copy link
Member

@vietj so you say it is package private and it should be not package-private ? Whats your use-case ?

@vietj
Copy link
Contributor Author

vietj commented May 19, 2017

my use case is to not send content in a response to HEAD, Vert.x has a special subclass (that you actually created) of HttpObjectEncoder that forces the usage of direct buffers, so we cannot use the HttpServerCodec that handles it.

Another motivation is that we might want to handle the HEAD check with a custom implementation of HttpMessage (like a boolean) and not use an a FIFO queue of HttpMessage like in HttpServerCodec.

@vietj
Copy link
Contributor Author

vietj commented May 26, 2017

any news about this ?

@normanmaurer
Copy link
Member

normanmaurer commented May 26, 2017 via email

@vietj
Copy link
Contributor Author

vietj commented May 26, 2017

sure I will

@vietj vietj changed the title HttpObjectEncoder#isContentAlwaysEmpty method is package protected HttpObjectEncoder#isContentAlwaysEmpty method is package private May 29, 2017
@vietj vietj changed the title HttpObjectEncoder#isContentAlwaysEmpty method is package private HttpObjectEncoder#isContentAlwaysEmpty cannot be overridden by subclasses May 29, 2017
vietj added a commit to vietj/netty that referenced this issue May 29, 2017
…sses

Motivation:

Allow subclasses of HttpObjectEncoder other than HttpServerCodec to override the isContentAlwaysEmpty method

Modification:

Change the method visibility from package private to protected

Result:

Fixes netty#6761
@normanmaurer
Copy link
Member

Fixed by #6788

@normanmaurer normanmaurer added this to the 4.1.12.Final milestone May 31, 2017
@normanmaurer normanmaurer self-assigned this May 31, 2017
liuzhengyang pushed a commit to liuzhengyang/netty that referenced this issue Sep 10, 2017
…sses

Motivation:

Allow subclasses of HttpObjectEncoder other than HttpServerCodec to override the isContentAlwaysEmpty method

Modification:

Change the method visibility from package private to protected

Result:

Fixes netty#6761
kiril-me pushed a commit to kiril-me/netty that referenced this issue Feb 28, 2018
…sses

Motivation:

Allow subclasses of HttpObjectEncoder other than HttpServerCodec to override the isContentAlwaysEmpty method

Modification:

Change the method visibility from package private to protected

Result:

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

No branches or pull requests

2 participants