# HG changeset patch # User chegar # Date 1517830571 0 # Node ID f5473559b6d38ec77d899d870c2f4976e0400293 # Parent a02d0098c630752decfc4c718acafb01e03d5146 http-client-branch: fix mutable byte[] references diff -r a02d0098c630 -r f5473559b6d3 src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/frame/GoAwayFrame.java --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/frame/GoAwayFrame.java Thu Feb 01 15:37:38 2018 +0000 +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/frame/GoAwayFrame.java Mon Feb 05 11:36:11 2018 +0000 @@ -40,7 +40,7 @@ public GoAwayFrame(int lastStream, int errorCode, byte[] debugData) { super(0, 0, errorCode); this.lastStream = lastStream; - this.debugData = debugData; + this.debugData = debugData.clone(); } @Override @@ -63,7 +63,7 @@ } public byte[] getDebugData() { - return debugData; + return debugData.clone(); } } diff -r a02d0098c630 -r f5473559b6d3 src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/frame/PingFrame.java --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/frame/PingFrame.java Thu Feb 01 15:37:38 2018 +0000 +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/frame/PingFrame.java Mon Feb 05 11:36:11 2018 +0000 @@ -38,7 +38,7 @@ public PingFrame(int flags, byte[] data) { super(0, flags); assert data.length == 8; - this.data = data; + this.data = data.clone(); } @Override @@ -61,7 +61,7 @@ } public byte[] getData() { - return data; + return data.clone(); } }