Affects Version/s: Version 5.0.0
Fix Version/s: Version 5.0.1
The race condition can lead to a rare exception in a multithreaded environment.
The class uses two fields and initialises them lazy. The problem is that the process of initializing the field is not atomic, and simply declaring the fields volatile is not sufficient.
As an example: Thread A enters getFieldPath(1).
fieldPaths is is null so buildPaths happen.
Thread A build the first Path (index 0). Then Thread A pauses and Thread B the methode getFieldPath(1)
Thread B sees that _fieldPath is not null so it tries to access element 1, but that element was not build yet-> So Thread B gets null and bad things happen
This issue has been around since basicly forever, I just never reported it.
I will attach a fairly old source file wich I used to workaround this issue