From b93270aef26d850f96cce2965eb622bc0b7d5032 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Fri, 20 Oct 2017 20:51:50 -0700 Subject: [PATCH] JCLOUDS-1337: only set fs tier when non-null Fixes regression from 61d4be87467afd830208db9bbaa60df36eff8323. --- .../jclouds/s3/blobstore/functions/BlobToObjectMetadata.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apis/s3/src/main/java/org/jclouds/s3/blobstore/functions/BlobToObjectMetadata.java b/apis/s3/src/main/java/org/jclouds/s3/blobstore/functions/BlobToObjectMetadata.java index 48bae931f4..0ac61510f8 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/blobstore/functions/BlobToObjectMetadata.java +++ b/apis/s3/src/main/java/org/jclouds/s3/blobstore/functions/BlobToObjectMetadata.java @@ -49,7 +49,9 @@ public class BlobToObjectMetadata implements Function entry : from.getUserMetadata().entrySet()) to.getUserMetadata().put(entry.getKey().toLowerCase(), entry.getValue()); } - to.setStorageClass(StorageClass.fromTier(from.getTier())); + if (from.getTier() != null) { + to.setStorageClass(StorageClass.fromTier(from.getTier())); + } return to; }