avoiding more NoSuchMethod exceptions (#6671)

refs #6657
This commit is contained in:
Kamil Rojewski
2021-06-03 23:18:45 +02:00
committed by GitHub
parent 7c3e267e1e
commit 752c7b576d
7 changed files with 12 additions and 12 deletions

View File

@@ -56,7 +56,7 @@ public class Utf8Old extends Utf8 {
if (cache.lastOutput == null || cache.lastOutput.capacity() < estimated) {
cache.lastOutput = ByteBuffer.allocate(Math.max(128, estimated));
}
cache.lastOutput.clear();
((Buffer) cache.lastOutput).clear();
cache.lastInput = in;
CharBuffer wrap = (in instanceof CharBuffer) ?
(CharBuffer) in : CharBuffer.wrap(in);
@@ -68,7 +68,7 @@ public class Utf8Old extends Utf8 {
throw new IllegalArgumentException("bad character encoding", e);
}
}
cache.lastOutput.flip();
((Buffer) cache.lastOutput).flip();
return cache.lastOutput.remaining();
}