Skip to content

Commit 504bb4a

Browse files
committed
there is no need to clone the to-be-confused frame
1 parent 8c8ddc5 commit 504bb4a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

test/src/com/rabbitmq/client/test/functional/UnexpectedFrames.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,7 @@ public ConfusedFrameHandler(Socket socket) throws IOException {
2525

2626
@Override
2727
public void writeFrame(Frame frame) throws IOException {
28-
Frame confusedFrame = new Frame();
29-
confusedFrame.accumulator = frame.accumulator;
30-
confusedFrame.channel = frame.channel;
31-
confusedFrame.type = frame.type;
32-
33-
confusedFrame = confuser.confuse(confusedFrame);
28+
Frame confusedFrame = confuser.confuse(frame);
3429
if (confusedFrame != null) {
3530
super.writeFrame(confusedFrame);
3631
}

0 commit comments

Comments
 (0)