Skip to content
New issue

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

Improve some code details, fix some bugs #3161

Merged
merged 6 commits into from
Nov 17, 2024
Merged

Conversation

CodePlayer
Copy link
Contributor

@CodePlayer CodePlayer commented Nov 14, 2024

What this PR does / why we need it?

Summary of your change

  1. 复用部分方法,减少部分重复代码(报错的异常信息有一点调整)
  2. 基于 Java 特性,精简部分不必要的手动拆箱/装箱代码、重复性代码
  3. 移除 部分冗余的局部变量初始化
  4. 改进少量代码的性能表现
  5. 新增 .gitattributes,以尽量保证 Windows 上的文件换行符保持为 LF
  6. 修复一个疑似潜在的bug,代码位于 com.alibaba.fastjson2.JSONPathFunction.IndexValue#apply(),建议确认一下。
  7. 修复 Issue [BUG] CSVWriter 写入CSV数据超过 65536 个字节时报错 #2848[BUG]CSVWriter 写入CSV数据超过 65536 个字节时报错 [漏网之鱼] #2988

BTW,如果能够接受原始类型额外一次装箱的开销,将所有的原始类型取值方法 getXxxValue() 全部复用 getXxx(),代码会更加简洁优雅。

Please indicate you've done the following:

  • [√] Made sure tests are passing and test coverage is added if needed.
  • [√] Made sure commit message follow the rule of Conventional Commits specification.
  • [√] Considered the docs impact and opened a new docs issue or PR with docs changes if needed.

@CodePlayer CodePlayer changed the title Improve some code details Improve some code details, fix some bugs Nov 14, 2024
@wenshao wenshao merged commit 6c68b0e into alibaba:main Nov 17, 2024
5 checks passed
@wenshao
Copy link
Member

wenshao commented Nov 17, 2024

非常赞!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants