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

关于数据校验章节存在线程安全问题 #4

Open
lionhuo opened this issue Aug 30, 2021 · 1 comment
Open

关于数据校验章节存在线程安全问题 #4

lionhuo opened this issue Aug 30, 2021 · 1 comment

Comments

@lionhuo
Copy link

lionhuo commented Aug 30, 2021

项目:bookstore-monolithic-springboot
类: AccountValidation
protected Predicate predicate = c -> true;
多个注解使用成员变量predicate会不会造成线程安全问题?

@m1stake
Copy link

m1stake commented Jun 26, 2024

  1. 这个 predicate 已经在所有的子类的初始化方法里被替换了,根本不会执行这一段。
  2. 就算会执行,任何输入参数都直接返回 true,没有造成并发问题的角度。
  3. 所有子类都没用定义字段,predicate 就更不可能用到公用的字段,也有并发问题的角度。

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

No branches or pull requests

2 participants