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.
This commit is contained in:
Jason Tedor 2016-08-30 18:26:45 -04:00
parent abf8a1a3f0
commit 0853fc806f
1 changed files with 2 additions and 1 deletions

View File

@ -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());
}
}