Skip to content

Commit

Permalink
Cosmetic changes to have less changes with master
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-v committed Oct 1, 2024
1 parent b5a9cf8 commit 143679d
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 @@ -43,7 +43,7 @@ public ByteBuf encode(ServiceMessage message) {
}

@Override
public ServiceMessage decode(ByteBuf byteBuf) {
return ServiceMessage.builder().data(byteBuf).build();
public ServiceMessage decode(ByteBuf encodedMessage) {
return ServiceMessage.builder().data(encodedMessage).build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ public ByteBuf encode(ServiceMessage message) {
}

@Override
public ServiceMessage decode(ByteBuf byteBuf) {
try (InputStream stream = new ByteBufInputStream(byteBuf, true)) {
public ServiceMessage decode(ByteBuf encodedMessage) {
try (InputStream stream = new ByteBufInputStream(encodedMessage, true)) {
JsonParser jp = jsonFactory.createParser(stream);
ServiceMessage.Builder result = ServiceMessage.builder();

Expand Down Expand Up @@ -141,7 +141,7 @@ public ServiceMessage decode(ByteBuf byteBuf) {
}
// data
if (dataEnd > dataStart) {
result.data(byteBuf.copy((int) dataStart, (int) (dataEnd - dataStart)));
result.data(encodedMessage.copy((int) dataStart, (int) (dataEnd - dataStart)));
}
return result.build();
} catch (Throwable ex) {
Expand Down

0 comments on commit 143679d

Please sign in to comment.