Skip to content

construction method of http2serverupgradecodec to be public#15484

Merged
normanmaurer merged 1 commit intonetty:mainfrom
brucelwl:patch-1
Aug 11, 2025
Merged

construction method of http2serverupgradecodec to be public#15484
normanmaurer merged 1 commit intonetty:mainfrom
brucelwl:patch-1

Conversation

@brucelwl
Copy link
Copy Markdown
Contributor

for issue: #15483

Copy link
Copy Markdown
Member

@normanmaurer normanmaurer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use protected

}

private Http2ServerUpgradeCodec(String handlerName, Http2ConnectionHandler connectionHandler,
public Http2ServerUpgradeCodec(String handlerName, Http2ConnectionHandler connectionHandler,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public Http2ServerUpgradeCodec(String handlerName, Http2ConnectionHandler connectionHandler,
protected Http2ServerUpgradeCodec(String handlerName, Http2ConnectionHandler connectionHandler,

@brucelwl
Copy link
Copy Markdown
Contributor Author

brucelwl commented Aug 8, 2025

Let's use protected

All other methods are set to public, why only set this one to protected? Is there any concern?

@normanmaurer
Copy link
Copy Markdown
Member

Let's use protected

All other methods are set to public, why only set this one to protected? Is there any concern?

You mentioned you only need it to extend the class so I think protected is fine for now.

@brucelwl
Copy link
Copy Markdown
Contributor Author

brucelwl commented Aug 8, 2025

Let's use protected

All other methods are set to public, why only set this one to protected? Is there any concern?

You mentioned you only need it to extend the class so I think protected is fine for now.

Sorry, I need to use the Java new keyword to create the Http2ServerUpgradeCodec object. Using protected, I still cannot use new to create it outside the io.netty.handler.codec.http2 package. Using public is more suitable for accessing this constructor within my package scope.

@normanmaurer normanmaurer merged commit aa4e387 into netty:main Aug 11, 2025
30 of 33 checks passed
@normanmaurer
Copy link
Copy Markdown
Member

@brucelwl thanks!

@normanmaurer normanmaurer added this to the 5.0.0.Alpha6 milestone Aug 11, 2025
normanmaurer pushed a commit that referenced this pull request Aug 11, 2025
)

Motivation:
The last construction method of Http2ServerUpgradeCodec should also be set to public

Modifications:

- Change constructor to public

Result:
Fixes  #15483
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 this pull request may close these issues.

2 participants