From 0e21b76d239f39eac14f60a8de2469c08e32da49 Mon Sep 17 00:00:00 2001 From: Suraj Dhamecha <48670070+suraj-qlogic@users.noreply.github.com> Date: Mon, 27 Jul 2020 22:01:03 +0530 Subject: [PATCH] chore: remove unchecked call warning (#177) --- .../cloud/storage/contrib/nio/CloudStorageReadChannel.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageReadChannel.java b/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageReadChannel.java index 57c21fe5..5e62b7ca 100644 --- a/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageReadChannel.java +++ b/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageReadChannel.java @@ -108,15 +108,14 @@ private CloudStorageReadChannel( this.config = config; // get the generation, enshrine that in our options fetchSize(gcsStorage, userProject, file); - List options = Lists.newArrayList(blobSourceOptions); + List options = Lists.newArrayList(blobSourceOptions); if (null != generation) { options.add(Storage.BlobSourceOption.generationMatch(generation)); } if (!Strings.isNullOrEmpty(userProject)) { options.add(BlobSourceOption.userProject(userProject)); } - this.blobSourceOptions = - (BlobSourceOption[]) options.toArray(new BlobSourceOption[options.size()]); + this.blobSourceOptions = options.toArray(new BlobSourceOption[options.size()]); // innerOpen checks that it sees the same generation as fetchSize did, // which ensure the file hasn't changed.