diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/UnifiedOpts.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/UnifiedOpts.java index bcc987ea75..043c52dd55 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/UnifiedOpts.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/UnifiedOpts.java @@ -1228,8 +1228,7 @@ private MatchGlob(String val) { @Override public Mapper listObjects() { - return CrossTransportUtils.throwHttpJsonOnly( - com.google.cloud.storage.Storage.BlobListOption.class, "matchGlob(String)"); + return b -> b.setMatchGlobBytes(ByteString.copyFromUtf8(val)); } } diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITObjectTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITObjectTest.java index 99ed548098..7a88da5e48 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITObjectTest.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITObjectTest.java @@ -563,7 +563,6 @@ public void testListBlobsCurrentDirectoryIncludesBothObjectsAndSyntheticDirector @Test // When gRPC support is added for matchGlob, enable this test for gRPC. - @Exclude(transports = Transport.GRPC) public void testListBlobsWithMatchGlob() throws Exception { BucketInfo bucketInfo = BucketInfo.newBuilder(generator.randomBucketName()).build(); try (TemporaryBucket tempBucket =