From 507f806553b6ab6b694b7a859837381965c02f38 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Wed, 3 Nov 2021 15:58:58 +0100 Subject: [PATCH] Upgrade to latest netty-build (#354) Motivation: A new netty-build release is out. Modifications: - Upgrade version - Adjust code to match new checkstyle rules Result: Use latest netty-build --- pom.xml | 2 +- .../netty/incubator/codec/quic/InsecureQuicTokenHandler.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 9a9d8d3fb..2c177fda4 100644 --- a/pom.xml +++ b/pom.xml @@ -72,7 +72,7 @@ false jar 4.1.70.Final - 29 + 30 5.7.0 ${os.detected.name}-${os.detected.arch} netty_quiche_${os.detected.name}_${os.detected.arch} diff --git a/src/main/java/io/netty/incubator/codec/quic/InsecureQuicTokenHandler.java b/src/main/java/io/netty/incubator/codec/quic/InsecureQuicTokenHandler.java index 2b95696c0..2cb2f9c41 100644 --- a/src/main/java/io/netty/incubator/codec/quic/InsecureQuicTokenHandler.java +++ b/src/main/java/io/netty/incubator/codec/quic/InsecureQuicTokenHandler.java @@ -32,7 +32,8 @@ public final class InsecureQuicTokenHandler implements QuicTokenHandler { private static final String SERVER_NAME = "netty"; private static final byte[] SERVER_NAME_BYTES = SERVER_NAME.getBytes(CharsetUtil.US_ASCII); - private static final ByteBuf SERVER_NAME_BUFFER = Unpooled.wrappedBuffer(SERVER_NAME_BYTES); + private static final ByteBuf SERVER_NAME_BUFFER = Unpooled.unreleasableBuffer( + Unpooled.wrappedBuffer(SERVER_NAME_BYTES)).asReadOnly(); // Just package-private for unit tests static final int MAX_TOKEN_LEN = Quiche.QUICHE_MAX_CONN_ID_LEN +