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

删除代码规范第三条“当方法返回值可能为null时,应使用Optional作为返回值” #115

Open
mouse0w0 opened this issue May 23, 2022 · 1 comment

Comments

@mouse0w0
Copy link
Member

鉴于该条规范长期以来未得到有效实施,并且现代IDE(如IntelliJ)已经能在开发环境中对代码进行分析,并给出非空安全的警告,决定将代码规范第三条与第二条合并,改为:

2. 当方法参数和返回值可能为null时,应添加@javax.annotation.Nullable注解。
@mouse0w0 mouse0w0 changed the title 调整代码规范第三条“当方法返回值可能为null时,应使用Optional作为返回值” 删除代码规范第三条“当方法返回值可能为null时,应使用Optional作为返回值” May 23, 2022
@xtexChooser
Copy link
Member

那你倒是删啊(

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

No branches or pull requests

2 participants