From f52bfc0fde0913725350556836a019572c951817 Mon Sep 17 00:00:00 2001 From: XinRoom <32238570+XinRoom@users.noreply.github.com> Date: Thu, 27 May 2021 10:43:02 +0800 Subject: [PATCH] Fix error when compiled jdk9 and run with jdk8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复当使用jdk9编译的class运行于jdk8时buf.clear()错误的问题 https://github.com/plasma-umass/doppio/issues/497 --- templates/tunnel.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/tunnel.jsp b/templates/tunnel.jsp index d3ed6b7..fc96ca9 100644 --- a/templates/tunnel.jsp +++ b/templates/tunnel.jsp @@ -219,7 +219,7 @@ System.arraycopy(buf.array(), 0, data, 0, bytesRead); out.write(b64en(data)); out.flush(); - buf.clear(); + ((java.nio.Buffer)buf).clear(); bytesRead = socketChannel.read(buf); } response.setHeader("X-STATUS", "OK");