Skip to content

[FEATURE] Add JSpecify annotations #3526

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

Open
mymx2 opened this issue Apr 29, 2025 · 6 comments
Open

[FEATURE] Add JSpecify annotations #3526

mymx2 opened this issue Apr 29, 2025 · 6 comments
Labels
enhancement New feature or request

Comments

@mymx2
Copy link

mymx2 commented Apr 29, 2025

在库层面告知是否需要空判断。

Image

@mymx2 mymx2 added the enhancement New feature or request label Apr 29, 2025
@wenshao
Copy link
Member

wenshao commented Apr 30, 2025

没明白你的意思?这个有什么问题?

@mymx2
Copy link
Author

mymx2 commented Apr 30, 2025

没明白你的意思?这个有什么问题?

我上一个添加jspecify https://jspecify.dev/docs/start-here 后的实际效果吧。当然空安全是个庞大的工作,但仍需进行。

Image

@wenshao
Copy link
Member

wenshao commented Apr 30, 2025

fastjson是要零依赖的,不能依赖任何第三方Annotation

@mymx2
Copy link
Author

mymx2 commented Apr 30, 2025

fastjson是要零依赖的,不能依赖任何第三方Annotation

这应该不是拒绝采用该方案的合理理由,实际上该库仅包含注解。

@wenshao
Copy link
Member

wenshao commented Apr 30, 2025

原来的代码就很清晰,引入引来无论是编译期还是运行期都没有必要

@jabrena
Copy link

jabrena commented May 10, 2025

Sharing one example with java:
https://github.com/jabrena/java-jspecify-maven-poc/

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

No branches or pull requests

3 participants