We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Springboot: 2.1.3.RELEASE JAVA: OpenJDK 1.8 fastjson: 2.0.8
要存入redis的是一个byte数组
redisTemplate配置有三种情况: 一:使用fastjson1
template.setValueSerializer(new GenericFastJsonRedisSerializer());
二:使用fastjson2 JSON
三:使用fastjson2 JSONB
template.setValueSerializer(new GenericFastJsonRedisSerializer(true));
在JSONWriterJSONB类的public void writeBinary(byte[] bytes)方法中
void ensureCapacity(int minCapacity) // 这个方法给 this.bytes调整长度,得到的长度比需要序列化的byte数组bytes长了10位,但是在下面的方法中 System.arraycopy(bytes, 0, this.bytes, off, bytes.length); //off 是11,这样正好把bytes复制到this.bytes时正好少了一位 //导致报错ArrayIndexOutOfBoundsException
The text was updated successfully, but these errors were encountered:
bug fix for writeBinary ensureCapacity, fix issue #537
3612a52
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.9-SNAPSHOT/ 问题已经修复,请用2.0.9-SNAPSHOT版本验证
Sorry, something went wrong.
https://github.com/alibaba/fastjson2/releases/tag/2.0.9 问题已修复,请用新版本
No branches or pull requests
版本
Springboot: 2.1.3.RELEASE
JAVA: OpenJDK 1.8
fastjson: 2.0.8
问题描述
要存入redis的是一个byte数组
redisTemplate配置有三种情况:
一:使用fastjson1
二:使用fastjson2 JSON
三:使用fastjson2 JSONB
相关日志输出
在JSONWriterJSONB类的public void writeBinary(byte[] bytes)方法中
The text was updated successfully, but these errors were encountered: