Skip to content

Commit

Permalink
Change method argument order to be consistent (java-native-access#616)
Browse files Browse the repository at this point in the history
Motivation:

We should use the same order of method arguments to not introduce bugs
later.

Modifications:

Change argument order to be consistent and fix a typo

Result:

Cleanup
  • Loading branch information
normanmaurer authored Nov 20, 2023
1 parent 1b311c4 commit c6e6dd2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -860,8 +860,8 @@ StreamRecvResult streamRecv(long streamId, ByteBuf buffer) throws Exception {
/**
* Receive some data on a QUIC connection.
*/
void recv(InetSocketAddress recipient, InetSocketAddress sender, ByteBuf buffer) {
((QuicChannelUnsafe) unsafe()).connectionRecv(recipient, sender, buffer);
void recv(InetSocketAddress sender, InetSocketAddress recipient, ByteBuf buffer) {
((QuicChannelUnsafe) unsafe()).connectionRecv(sender, recipient, buffer);
}

void writable() {
Expand Down Expand Up @@ -1373,7 +1373,7 @@ private void fireConnectCloseEventIfNeeded(long connAddr) {
}
}

void connectionRecv(InetSocketAddress recipient, InetSocketAddress sender, ByteBuf buffer) {
void connectionRecv(InetSocketAddress sender, InetSocketAddress recipient, ByteBuf buffer) {
if (isConnDestroyed()) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,12 @@ public void process(InetSocketAddress sender, InetSocketAddress recipient, ByteB
type, version, scid,
dcid, token);
if (channel != null) {
// Add to queue first, we might be able to safe some flushes and consolidate them
// Add to queue first, we might be able to save some flushes and consolidate them
// in channelReadComplete(...) this way.
if (channel.markInFireChannelReadCompleteQueue()) {
needsFireChannelReadComplete.add(channel);
}
channel.recv(recipient, sender, buffer);
channel.recv(sender, recipient, buffer);
}
}
}
Expand Down

0 comments on commit c6e6dd2

Please sign in to comment.