You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fury.apache.org by "DemonJun (via GitHub)" <gi...@apache.org> on 2024/09/26 02:52:59 UTC
[I] java.lang.UnsupportedOperationException: Class class java.util.LinkedHashMap$Entry doesn't support serialization [fury]
DemonJun opened a new issue, #1855:
URL: https://github.com/apache/fury/issues/1855
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/fury/issues) and found no similar issues.
### Version
0.7.1
### Component(s)
Java
### Minimal reproduce step
List<Class<?>> NEED_REGISTER_CLASS = List.of(JSONObject.class, JSONArray.class);
Fury fury =
Fury.builder()
.withLanguage(Language.JAVA)
.withClassLoader(Thread.currentThread().getClass().getClassLoader())
.withRefTracking(false)
.withNumberCompressed(true)
.withLongCompressed(true)
.withStringCompressed(true)
.registerGuavaTypes(true)
// 关闭类型注册
.requireClassRegistration(false)
// 开启异步编译,提高第一次序列化效率
.withAsyncCompilation(true)
.build();
AllowListChecker classChecker = new AllowListChecker();
for (Class<?> aclass : NEED_REGISTER_CLASS) {
fury.register(aclass);
}
// 因为关闭了 类型注册检查,这里额外添加一些,运行序列化的类前缀路径,尽量为了安全
classChecker.allowClass("sun.util.calendar.ZoneInfo");
fury.getClassResolver().setClassChecker(classChecker);
JSONObject data = JSONObject.of();
data.put("a",1);
JSONObject copy = fury.copy(data);
System.out.println(copy);
### What did you expect to see?
可以正常序列化 map 类型
### What did you see instead?
upgrade to 0.7.0
### Anything Else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] java.lang.UnsupportedOperationException: Class class java.util.LinkedHashMap$Entry doesn't support serialization [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang closed issue #1855: java.lang.UnsupportedOperationException: Class class java.util.LinkedHashMap$Entry doesn't support serialization
URL: https://github.com/apache/fory/issues/1855
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org