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.