Skip to content

Commit bb4373f

Browse files
committed
Changed FastJson2SerializationTest#testReadByte date variable type to LocalDate
1 parent 6a69ad4 commit bb4373f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dubbo-serialization/dubbo-serialization-fastjson2/src/test/java/org/apache/dubbo/common/serialize/fastjson2/FastJson2SerializationTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import java.io.ByteArrayInputStream;
2828
import java.io.ByteArrayOutputStream;
2929
import java.io.IOException;
30-
import java.util.Date;
30+
import java.time.LocalDate;
3131
import java.util.HashMap;
3232
import java.util.LinkedList;
3333
import java.util.List;
@@ -227,7 +227,8 @@ void testReadByte() throws IOException {
227227
{
228228
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
229229
ObjectOutput objectOutput = serialization.serialize(url, outputStream);
230-
objectOutput.writeObject(new Date());
230+
// fastjson2 could not read byte from the serialization of LocalDate by now. 2025/04/02
231+
objectOutput.writeObject(LocalDate.now());
231232
objectOutput.flushBuffer();
232233

233234
byte[] bytes = outputStream.toByteArray();

0 commit comments

Comments
 (0)