Azure / azure-storage-java

Microsoft Azure Storage Library for Java
https://docs.microsoft.com/en-us/java/api/overview/azure/storage
MIT License
189 stars 163 forks source link

listBlobs(NAME) creates the blob NAME for paged blobs #521

Closed trinevo closed 4 years ago

trinevo commented 4 years ago

Which service(blob, file, queue, table) does this issue concern?

Page Blob

Which version of the SDK was used?

azure-storage-8.6.0

What problem was encountered?

I wrote a negative test for querying of page blobs with use listBlobs method, passing as a parameter sequentially generated blob name with notsupposedtoexist suffix to verify that no blobs will be returned (it works perfectly for block blobs).

final Iterable<ListBlobItem> blobs = c.listBlobs(info.key, true);

And the tests is actually able to find the blob with this goofy name every time, because the API creates it. I can see it also in the Azure Storage Explorer.

image

I understand the Create-If-Not-Exists policy when obtaining a reference to a blob or container, but for listBlobs?

Have you found a mitigation/solution?

No.

trinevo commented 4 years ago

Sorry, my bad. This issue is invalid.