Skip to content

Commit 4bc4e09

Browse files
committed
Fixed canEncode, doCanDecode conditions
Signed-off-by: dongko <[email protected]> Signed-off-by: dongKos <[email protected]>
1 parent 3baeb76 commit 4bc4e09

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/ByteArrayInputStreamCodec.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 asyncer.io projects
2+
* Copyright 2025 asyncer.io projects
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -52,12 +52,12 @@ public ByteArrayInputStream decode(ByteBuf value, MySqlReadableMetadata metadata
5252

5353
@Override
5454
protected boolean doCanDecode(MySqlReadableMetadata metadata) {
55-
return metadata.getJavaType() == InputStream.class;
55+
return metadata.getType().isBinary();
5656
}
5757

5858
@Override
5959
public boolean canEncode(Object value) {
60-
return value instanceof InputStream;
60+
return value instanceof ByteArrayInputStream;
6161
}
6262

6363
@Override

0 commit comments

Comments
 (0)