Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Reviewed
Description
Storage#shouldReturnNextDir method checks if the next Storage directory is of the same type us dirType.
private boolean shouldReturnNextDir() { StorageDirectory sd = getStorageDir(nextIndex); return (dirType == null || sd.getStorageDirType().isOfType(dirType)) && (includeShared || !sd.isShared()); }
There is a possibility that sd.getStorageDirType() returns null (default dirType is null). Hence, before checking for type match, we should make sure that the value returned by sd.getStorageDirType() is not null.