|
14 | 14 | import io.netty.buffer.ByteBuf;
|
15 | 15 | import io.netty.buffer.Unpooled;
|
16 | 16 | import io.netty.handler.codec.DecoderException;
|
| 17 | +import io.vertx.core.buffer.impl.BufferInternal; |
17 | 18 | import io.vertx.core.json.Json;
|
18 | 19 | import io.vertx.core.json.JsonArray;
|
19 | 20 | import io.vertx.core.json.JsonObject;
|
@@ -346,7 +347,7 @@ private static void binaryEncodeText(String value, ByteBuf buffer, Charset chars
|
346 | 347 |
|
347 | 348 | private static void binaryEncodeBlob(Buffer value, ByteBuf buffer) {
|
348 | 349 | BufferUtils.writeLengthEncodedInteger(buffer, value.length());
|
349 |
| - buffer.writeBytes(value.getByteBuf()); |
| 350 | + buffer.writeBytes(((BufferInternal)value).getByteBuf()); |
350 | 351 | }
|
351 | 352 |
|
352 | 353 | private static void binaryEncodeDate(LocalDate value, ByteBuf buffer) {
|
@@ -553,7 +554,7 @@ private static Buffer binaryDecodeBlob(ByteBuf buffer) {
|
553 | 554 | ByteBuf copy = Unpooled.buffer(len);
|
554 | 555 | copy.writeBytes(buffer, len);
|
555 | 556 |
|
556 |
| - return Buffer.buffer(copy); |
| 557 | + return BufferInternal.buffer(copy); |
557 | 558 | }
|
558 | 559 |
|
559 | 560 | private static String binaryDecodeText(int collationId, ByteBuf buffer) {
|
@@ -685,7 +686,7 @@ private static Object textDecodeBlobOrText(int collationId, ByteBuf buffer, int
|
685 | 686 | private static Buffer textDecodeBlob(ByteBuf buffer, int index, int length) {
|
686 | 687 | ByteBuf copy = Unpooled.buffer(length);
|
687 | 688 | copy.writeBytes(buffer, index, length);
|
688 |
| - return Buffer.buffer(copy); |
| 689 | + return BufferInternal.buffer(copy); |
689 | 690 | }
|
690 | 691 |
|
691 | 692 | private static String textDecodeText(int collationId, ByteBuf buffer, int index, int length) {
|
|
0 commit comments