Fury does not preserve script/extensions following serialise/deserialise

未关闭
#3,966 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Sarthak-Pandey 已经在做这个了。

开始于 2026年10月5日。

  • #4123 来自 @Sarthak-Pandey —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
java
领域
backend

调研方向

从 Fury 对 java.util.Locale 的 Java 序列化处理开始,并对 Locale.getAvailableLocales() 执行提供的往返测试。确保对于包含脚本或扩展的 locale,往返后的 Locale 与原始 Locale 相等,同时保留现有的语言、国家/地区和变体行为。

由索引模型根据 Issue 内容生成。

描述

bug
Search before asking
  • I had searched in the issues and found no similar issues.
Version

Fury only serialises the language/country/variant fields of a Locale, ignoring any script/extensions, resulting in an inconsistent values following deserialisation.

Component(s)

Java

Minimal reproduce step

On my machine:

Fory fory = Fory.builder().withLanguage(Language.JAVA).build();
for (Locale locale : Locale.getAvailableLocales()) {
  Locale deserialised = fory.deserialize(fory.serialize(locale));
  assertEquals(locale, deserialised); // This fails for locales that define a script or extensions
}
What did you expect to see?

Assertions should pass.

What did you see instead?

The assertion fails for any locale that defines a script or extensions.

Anything Else?

No response

Are you willing to submit a PR?
  • I'm willing to submit a PR!
主要语言
Java
星标
4.6k
派生
470
平均合并
9 小时 28 分钟
30 天内合并 PR
33

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/fory 的其他 Issue

查看 apache/fory 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。