From 0853fc806f32ad05a7a5c0c489c510bcb1424c7b Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Tue, 30 Aug 2016 18:26:45 -0400 Subject: [PATCH] Add missing cast to logging message supplier This commit adds a missing cast to logging message supplier on a single invocation receiving a parameterized message parameter. --- .../cloud/azure/storage/AzureStorageServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/storage/AzureStorageServiceImpl.java b/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/storage/AzureStorageServiceImpl.java index b7206d3659b..cd201e7ff56 100644 --- a/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/storage/AzureStorageServiceImpl.java +++ b/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/storage/AzureStorageServiceImpl.java @@ -28,6 +28,7 @@ import com.microsoft.azure.storage.blob.CloudBlobContainer; import com.microsoft.azure.storage.blob.CloudBlockBlob; import com.microsoft.azure.storage.blob.ListBlobItem; import org.apache.logging.log4j.message.ParameterizedMessage; +import org.apache.logging.log4j.util.Supplier; import org.elasticsearch.common.Strings; import org.elasticsearch.common.blobstore.BlobMetaData; import org.elasticsearch.common.blobstore.support.PlainBlobMetaData; @@ -173,7 +174,7 @@ public class AzureStorageServiceImpl extends AbstractComponent implements AzureS logger.trace("creating container [{}]", container); blobContainer.createIfNotExists(); } catch (IllegalArgumentException e) { - logger.trace(() -> new ParameterizedMessage("fails creating container [{}]", container), e); + logger.trace((Supplier) () -> new ParameterizedMessage("fails creating container [{}]", container), e); throw new RepositoryException(container, e.getMessage()); } }