Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0-alpha
-
None
-
Reviewed
Description
The DirectoryScanner may fail with an IOOB if the directory scanning threads return out of volume order (ie volume scanner #3 returns before volume scanner #2). This is because it's using an ArrayList and ArrayList#add(index, element) throws IOOB if idx >= size, and size is only increased as elements are added, therefore adds have to be done in index order. Since we know the size when we create the ArrayList let's just use an array (perhaps an ArrayList was used originally because someone thought array creation called the default constructor?).