We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1299fb8 commit 7c47716Copy full SHA for 7c47716
core/src/main/java/kafka/automq/failover/FailoverListener.java
@@ -80,11 +80,11 @@ private Optional<FailoverContext[]> getContexts(MetadataDelta delta) {
80
.map(kv -> kv.get(FailoverConstants.FAILOVER_KEY))
81
.map(this::decodeContexts);
82
}
83
-
+
84
private FailoverContext[] decodeContexts(ByteBuffer byteBuffer) {
85
- byteBuffer.slice();
86
- byte[] data = new byte[byteBuffer.remaining()];
87
- byteBuffer.get(data);
+ ByteBuffer slice = byteBuffer.slice();
+ byte[] data = new byte[slice.remaining()];
+ slice.get(data);
88
return JsonUtils.decode(new String(data, StandardCharsets.UTF_8), FailoverContext[].class);
89
90
0 commit comments