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

Java fast-fail 机制 #20

Open
DraperHXY opened this issue Jan 20, 2019 · 0 comments
Open

Java fast-fail 机制 #20

DraperHXY opened this issue Jan 20, 2019 · 0 comments

Comments

@DraperHXY
Copy link
Owner

为何会有这种机制

在 Java 中这是一种错误机制,从而避免更大的错误
例如 ArrayList 在迭代(list.hasNext())的时候,另外一个操作改变了 ArrayList 的结构,从而抛出异常,避免引起其他的错误。

代码实现

如何避免 fast-fail

java.util 包替换成 java.util.concurrent 包下的相应实现类

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

1 participant