GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix incorrect cast in NioDomainSocketChannel.parent() by yawkat · Pull Request #14409 · netty/netty

Conversation

@yawkat

@yawkat yawkat commented Oct 22, 2024

Copy link
Copy Markdown
Contributor

Motivation:

NioDomainSocketChannel.parent() returned a ServerSocketChannel, which is not implemented by NioServerDomainSocketChannel. This makes the parent method unusable.

Modification:

Change the return type and cast to ServerChannel. Unfortunately this is a binary incompatible change, but there is no way to make this change in a binary compatible way, and the method never worked in the first place.

Result:

parent() becomes usable.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@yawkat
Fix incorrect cast in NioDomainSocketChannel.parent()
ff2e9e0
Motivation:

NioDomainSocketChannel.parent() returned a ServerSocketChannel, which is not implemented by NioServerDomainSocketChannel. This makes the parent method unusable.

Modification:

Change the return type and cast to ServerChannel. Unfortunately this is a binary incompatible change, but there is no way to make this change in a binary compatible way, and the method never worked in the first place.

Result:

parent() becomes usable.
@yawkat

yawkat commented Oct 22, 2024

Copy link
Copy Markdown
Contributor Author

oops, test case still needs some work

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@yawkat
fix test
1fa94cc
@chrisvest

chrisvest commented Oct 22, 2024

Copy link
Copy Markdown
Member

Needs a revapi exception:

{
  "ignore": true,
  "code": "java.method.returnTypeChanged",
  "old": "method io.netty.channel.socket.ServerSocketChannel io.netty.channel.socket.nio.NioDomainSocketChannel::parent()",
  "new": "method io.netty.channel.ServerChannel io.netty.channel.socket.nio.NioDomainSocketChannel::parent()",
  "justification": "ADD YOUR EXPLANATION FOR THE NECESSITY OF THIS CHANGE"
  /*  "oldType": "io.netty.channel.socket.ServerSocketChannel",
  "newType": "io.netty.channel.ServerChannel",
  "package": "io.netty.channel.socket.nio",
  "classQualifiedName": "io.netty.channel.socket.nio.NioDomainSocketChannel",
  "classSimpleName": "NioDomainSocketChannel",
  "methodName": "parent",
  "elementKind": "method",
  "oldArchive": "io.netty:netty-transport:jar:4.1.114.Final",
  "oldArchiveRole": "primary",
  "newArchive": "io.netty:netty-transport:jar:4.1.115.Final-SNAPSHOT",
  "newArchiveRole": "primary",
  */

},

It might also need a japicmp exception.

yawkat reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@yawkat
revapi/japicmp exceptions
14fb53b
chrisvest
chrisvest approved these changes Oct 22, 2024
View reviewed changes
@chrisvest chrisvest added this to the 4.1.115.Final milestone Oct 22, 2024
@chrisvest
chrisvest merged commit 8e95a48 into netty:4.1 Oct 22, 2024
chrisvest pushed a commit that referenced this pull request Oct 22, 2024
@yawkat @chrisvest
Fix incorrect cast in NioDomainSocketChannel.parent() (#14409)
7eba840
Motivation:

NioDomainSocketChannel.parent() returned a ServerSocketChannel, which is
not implemented by NioServerDomainSocketChannel. This makes the parent
method unusable.

Modification:

Change the return type and cast to ServerChannel. Unfortunately this is
a binary incompatible change, but there is no way to make this change in
a binary compatible way, and the method never worked in the first place.

Result:

parent() becomes usable.
@chrisvest

chrisvest commented Oct 22, 2024

Copy link
Copy Markdown
Member

Thanks!

yawkat reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Sep 14, 2026
Http2: Reserve promised stream for PUSH_PROMISE after local RST_STREAM #17471
Closed
cache failure 1233e4a5 #17565
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chrisvest chrisvest chrisvest approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

4.1.115.Final

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@yawkat @chrisvest
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.