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

Remove unnecessary checks in WebSocket08FrameDecoder (IDE highlighted) #11113

Merged
merged 1 commit into from
Mar 29, 2021

Conversation

doom369
Copy link
Contributor

@doom369 doom369 commented Mar 24, 2021

First check frameOpcode != OPCODE_PING is removed because the code executed int the branch where frameOpcode <= 7, while OPCODE_PING is 9.

Second check frameOpcode != OPCODE_PING is removed because the above code has:

if (frameOpcode == OPCODE_PING) {
   ...
   return;
}

@normanmaurer normanmaurer added this to the 4.1.61.Final milestone Mar 29, 2021
@normanmaurer normanmaurer merged commit aaef549 into netty:4.1 Mar 29, 2021
@normanmaurer
Copy link
Member

@doom369 thanks

normanmaurer pushed a commit that referenced this pull request Mar 29, 2021
Motivation:

There are some redundant checks and so these can be removed

Modifications:

- First check frameOpcode != OPCODE_PING is removed because the code executed int the branch where frameOpcode  <= 7, while OPCODE_PING is 9.
- Second check frameOpcode != OPCODE_PING is removed because its checked before.

Result:

Code cleanup
raidyue pushed a commit to raidyue/netty that referenced this pull request Jul 8, 2022
Motivation:

There are some redundant checks and so these can be removed

Modifications:

- First check frameOpcode != OPCODE_PING is removed because the code executed int the branch where frameOpcode  <= 7, while OPCODE_PING is 9.
- Second check frameOpcode != OPCODE_PING is removed because its checked before.

Result:

Code cleanup
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.

None yet

2 participants