Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vehicles: fix regression in GenericStorageInfo
Motivation: Commit 5d60302 introduced a regression when handling a deserliased StorageInfo from an earlier version of dCache. Under these circumstances, the new field is not initialised and is `null`. Modification: Remove the _locationsRO field. This is an example of premature optimisation. Currently, GenericStorageInfo contains a memory optimisation for the common case where a file has no tape locations. This implementation is broken (works-by-accident). This patch fixes this, so the optimisation is applied uniformly and all functions work at expected. Remove various tests the check whether `_locations` is `null`. There is no way that `_locations` can be `null`, so these tests are redundant and only make the code harder to read. Result: An unreleased regression is fixed. Target: master Requires-notes: no Requires-book: no Patch: https://rb.dcache.org/r/13427/ Acked-by: Tigran Mkrtchyan
- Loading branch information