Hi Lei (Eddy) Xu,
what about setting FsVolumeImpl#storageStorage as final ...
I assume you meant FsVolumeImpl#storageLocation here? Yes, I think this makes sense. So, the changes will be the following:
1) Have only one constructor for FsVolumeImpl, which takes in as input the StorageDirectory. This would involve moving the code in the private FsVolumeImpl(...String currentDir...StorageLocation storageLocation) to the FsVolumeImpl(...,StorageDirectory sd, ...) constructor.
2) Declare both FsVolumeImpl#storageLocation, and FsVolumeImpl#currentDir as final.
The above changes will ensure that both are initialized consistently, and they are not modified again.
Is this what you had in mind?
I will post the updated patch soon.