Anything related to fail-fast error management strategy, i.e. that software design principle requiring that in case of error a unit of code encapsulation (a module, a function, a method, etc.) should fail in the shortest possible time, reporting a failure to its client code in a clear and unambiguous way.
Questions tagged [fail-fast]
51 questions
0
votes
1 answer
Why Hashmap fail-fast not happen in the resize function? (for multiple thread race condition issue)
All, I was trying to understand the multiple thread race condition issue for the Hashmap resize function.
As I read from here. The race condition issue will cause the infinite loop link for the entry list.
I already knew that Hashmap has the…

Joe.wang
- 11,537
- 25
- 103
- 180
0
votes
1 answer
Why Iterators fail fast and are they truly fail fast?
Iterators in Java are fail-fast. If an iterator values change while it is being iterated over, an exception is thrown.
Is this purely to be safe? I am sure that in some cases, it doesn't matter that much if the values change. For example, suppose…

More Than Five
- 9,959
- 21
- 77
- 127
-1
votes
1 answer
Why we need fail fast and fail safe software design?
We know Java has fail-fast and fail-safe iteration design.
I want to know , why we need these basically. Is there any fundamental reason for this separation? . What is the benefit of this design?.
Other than collection iteration , Java follows this…

JavaUser
- 25,542
- 46
- 113
- 139
-1
votes
4 answers
Why is there no error when using iterator.remove?
If I use Iterator.remove(), everything is fine. If I use ArryaList.remove(), I always receive the error java.util.ConcurrentModificationException.
Can anyone point out the reason?

Adam Lee
- 24,710
- 51
- 156
- 236
-3
votes
1 answer
How can we handle the Java ConcurrentModificationException using try-catch?
I am trying to handle the java ConcurrentModificationException exception using try-catch block but still I am getting the same error when compiling the code.
import java.util.*;
public class failFast{
public static void main(String[] args){
…
-3
votes
1 answer
Linux: How to cat stdout of a process until the end, but stop and return a non-zero code if certain string appears?
We have a tool that runs tests, but does return an error code if they fail.
The tool runs the tests after starting logging in through SSH to a custom console (not bash) and issuing a command. All tests run at once within that invocation
The logging…

Ondra Žižka
- 43,948
- 41
- 217
- 277