JCLOUDS-1337: only set fs tier when non-null

Fixes regression from 61d4be8746.
This commit is contained in:
Andrew Gaul 2017-10-17 23:14:09 -07:00
parent 89053d9a8b
commit 5448b92ee8
1 changed files with 4 additions and 1 deletions

View File

@ -371,7 +371,10 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy {
buf.flip();
expires = new Date(buf.asLongBuffer().get());
}
tier = Tier.valueOf(readStringAttributeIfPresent(view, attributes, XATTR_STORAGE_TIER));
String tierString = readStringAttributeIfPresent(view, attributes, XATTR_STORAGE_TIER);
if (tierString != null) {
tier = Tier.valueOf(tierString);
}
for (String attribute : attributes) {
if (!attribute.startsWith(XATTR_USER_METADATA_PREFIX)) {
continue;