diff --git a/BreakingChanges.txt b/BreakingChanges.txt index 1f4e842aea7a4..4603d0756842f 100644 --- a/BreakingChanges.txt +++ b/BreakingChanges.txt @@ -2,6 +2,7 @@ * HTTPGetterInfo was made an internal type as it is an internal implementation detail. * DownloadResponse constructor was made internal as there is no need for customers to construct their own responses; all HTTP responses should be generated internally. * Removed DEFAULT and NONE static variables. Empty constructors should be used instead. DEFAULT static values were error prone and unsafe to use because although the field was final, the objects were mutable, so it was possible the value could be changed accidentally and alter the behavior of the program. +* Changed *ListingDetails to *ListDetails. These name changes are to mitigate conflicts with v8, allowing for side-by-side loading of different versions, which may help with upgrading. 2018.08.11 Version 10.1.0 * Interfaces for helper types updated to be more consistent throughout the library. All types, with the exception of the options for pipeline factories, use a fluent pattern. diff --git a/ChangeLog.txt b/ChangeLog.txt index 5a882033d6c5f..417494a922c6b 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -5,6 +5,7 @@ XXXX.XX.XX Version XX.X.X * Optimized the TransferManager download to file method to skip the initial HEAD request. * Added an option to configure that maximum size data that will be uploaded in a single shot via the TransferManager. * Added request Http Method, URL, and headers to logging messages. +* Changed *ListingDetails to *ListDetails. These name changes are to mitigate conflicts with v8, allowing for side-by-side loading of different versions, which may help with upgrading. 2018.10.29 Version 10.2.0 * Added overloads which only accept the required parameters. diff --git a/src/main/java/com/microsoft/azure/storage/blob/BlobListingDetails.java b/src/main/java/com/microsoft/azure/storage/blob/BlobListDetails.java similarity index 90% rename from src/main/java/com/microsoft/azure/storage/blob/BlobListingDetails.java rename to src/main/java/com/microsoft/azure/storage/blob/BlobListDetails.java index 09fc304e7c081..be0474794f871 100644 --- a/src/main/java/com/microsoft/azure/storage/blob/BlobListingDetails.java +++ b/src/main/java/com/microsoft/azure/storage/blob/BlobListDetails.java @@ -24,7 +24,7 @@ * changing the details for a different listing operation requires construction of a new object. Null may be passed if * none of the options are desirable. */ -public final class BlobListingDetails { +public final class BlobListDetails { private boolean copy; @@ -36,7 +36,7 @@ public final class BlobListingDetails { private boolean deletedBlobs; - public BlobListingDetails() { + public BlobListDetails() { } /** @@ -51,7 +51,7 @@ public boolean copy() { * Whether blob metadata related to any current or previous Copy Blob operation should be included in the * response. */ - public BlobListingDetails withCopy(boolean copy) { + public BlobListDetails withCopy(boolean copy) { this.copy = copy; return this; } @@ -66,7 +66,7 @@ public boolean metadata() { /** * Whether blob metadata should be returned. */ - public BlobListingDetails withMetadata(boolean metadata) { + public BlobListDetails withMetadata(boolean metadata) { this.metadata = metadata; return this; } @@ -81,7 +81,7 @@ public boolean snapshots() { /** * Whether snapshots should be returned. Snapshots are listed from oldest to newest. */ - public BlobListingDetails withSnapshots(boolean snapshots) { + public BlobListDetails withSnapshots(boolean snapshots) { this.snapshots = snapshots; return this; } @@ -98,7 +98,7 @@ public boolean uncommittedBlobs() { * Whether blobs for which blocks have been uploaded, but which have not been committed using Put Block List, * should be included in the response. */ - public BlobListingDetails withUncommittedBlobs(boolean uncommittedBlobs) { + public BlobListDetails withUncommittedBlobs(boolean uncommittedBlobs) { this.uncommittedBlobs = uncommittedBlobs; return this; } @@ -113,7 +113,7 @@ public boolean deletedBlobs() { /** * Whether blobs which have been soft deleted should be returned. */ - public BlobListingDetails withDeletedBlobs(boolean deletedBlobs) { + public BlobListDetails withDeletedBlobs(boolean deletedBlobs) { this.deletedBlobs = deletedBlobs; return this; } diff --git a/src/main/java/com/microsoft/azure/storage/blob/ContainerListingDetails.java b/src/main/java/com/microsoft/azure/storage/blob/ContainerListDetails.java similarity index 86% rename from src/main/java/com/microsoft/azure/storage/blob/ContainerListingDetails.java rename to src/main/java/com/microsoft/azure/storage/blob/ContainerListDetails.java index 00452d1bbe928..6f68b241f3ec6 100644 --- a/src/main/java/com/microsoft/azure/storage/blob/ContainerListingDetails.java +++ b/src/main/java/com/microsoft/azure/storage/blob/ContainerListDetails.java @@ -22,11 +22,11 @@ * requests, so changing the details for a different listing operation requires construction of a new object. Null may * be passed if none of the options are desirable. */ -public final class ContainerListingDetails { +public final class ContainerListDetails { private boolean metadata; - public ContainerListingDetails() { + public ContainerListDetails() { } @@ -40,14 +40,14 @@ public boolean metadata() { /** * Whether metadata should be returned. */ - public ContainerListingDetails withMetadata(boolean metadata) { + public ContainerListDetails withMetadata(boolean metadata) { this.metadata = metadata; return this; } /* This is used internally to convert the details structure into the appropriate type to pass to the protocol layer. - It is intended to mirror the BlobListingDetails.toList() method, but is slightly different since there is only one + It is intended to mirror the BlobListDetails.toList() method, but is slightly different since there is only one possible value here currently. The customer should never have need for this. */ ListContainersIncludeType toIncludeType() { diff --git a/src/main/java/com/microsoft/azure/storage/blob/ListBlobsOptions.java b/src/main/java/com/microsoft/azure/storage/blob/ListBlobsOptions.java index bb64de08c7620..4df839e0f4b9d 100644 --- a/src/main/java/com/microsoft/azure/storage/blob/ListBlobsOptions.java +++ b/src/main/java/com/microsoft/azure/storage/blob/ListBlobsOptions.java @@ -20,27 +20,27 @@ */ public final class ListBlobsOptions { - private BlobListingDetails details; + private BlobListDetails details; private String prefix; private Integer maxResults; public ListBlobsOptions() { - this.details = new BlobListingDetails(); + this.details = new BlobListDetails(); } /** - * {@link BlobListingDetails} + * {@link BlobListDetails} */ - public BlobListingDetails details() { + public BlobListDetails details() { return details; } /** - * {@link BlobListingDetails} + * {@link BlobListDetails} */ - public ListBlobsOptions withDetails(BlobListingDetails details) { + public ListBlobsOptions withDetails(BlobListDetails details) { this.details = details; return this; } diff --git a/src/main/java/com/microsoft/azure/storage/blob/ListContainersOptions.java b/src/main/java/com/microsoft/azure/storage/blob/ListContainersOptions.java index 2c786c07d82ae..a7f2288e95339 100644 --- a/src/main/java/com/microsoft/azure/storage/blob/ListContainersOptions.java +++ b/src/main/java/com/microsoft/azure/storage/blob/ListContainersOptions.java @@ -21,27 +21,27 @@ */ public final class ListContainersOptions { - private ContainerListingDetails details; + private ContainerListDetails details; private String prefix; private Integer maxResults; public ListContainersOptions() { - this.details = new ContainerListingDetails(); + this.details = new ContainerListDetails(); } /** - * {@link ContainerListingDetails} + * {@link ContainerListDetails} */ - public ContainerListingDetails details() { + public ContainerListDetails details() { return details; } /** - * {@link ContainerListingDetails} + * {@link ContainerListDetails} */ - public ListContainersOptions withDetails(ContainerListingDetails details) { + public ListContainersOptions withDetails(ContainerListDetails details) { this.details = details; return this; } diff --git a/src/main/java/com/microsoft/azure/storage/blob/TransferManager.java b/src/main/java/com/microsoft/azure/storage/blob/TransferManager.java index 847426080402f..7cb84a866fa82 100644 --- a/src/main/java/com/microsoft/azure/storage/blob/TransferManager.java +++ b/src/main/java/com/microsoft/azure/storage/blob/TransferManager.java @@ -112,10 +112,6 @@ public static Single uploadFileToBlockBlob(final Asynchronou // i * blockLength could be a long, so we need a cast to prevent overflow. Flowable data = FlowableUtil.readFile(file, i * (long)blockLength, count); - // Report progress as necessary. - data = ProgressReporter.addParallelProgressReporting(data, optionsReal.progressReceiver(), - progressLock, totalProgress); - // Report progress as necessary. data = ProgressReporter.addParallelProgressReporting(data, optionsReal.progressReceiver(), progressLock, totalProgress); diff --git a/src/test/java/com/microsoft/azure/storage/ContainerAPITest.groovy b/src/test/java/com/microsoft/azure/storage/ContainerAPITest.groovy index 8e728ba3f3640..78c1bdbf75cd7 100644 --- a/src/test/java/com/microsoft/azure/storage/ContainerAPITest.groovy +++ b/src/test/java/com/microsoft/azure/storage/ContainerAPITest.groovy @@ -712,7 +712,7 @@ class ContainerAPITest extends APISpec { def "List blobs flat options copy"() { setup: - ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListingDetails().withCopy(true)) + ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListDetails().withCopy(true)) String normalName = "a" + generateBlobName() String copyName = "c" + generateBlobName() String metadataName = "m" + generateBlobName() @@ -736,7 +736,7 @@ class ContainerAPITest extends APISpec { def "List blobs flat options metadata"() { setup: - ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListingDetails().withMetadata(true)) + ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListDetails().withMetadata(true)) String normalName = "a" + generateBlobName() String copyName = "c" + generateBlobName() String metadataName = "m" + generateBlobName() @@ -757,7 +757,7 @@ class ContainerAPITest extends APISpec { def "List blobs flat options snapshots"() { setup: - ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListingDetails().withSnapshots(true)) + ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListDetails().withSnapshots(true)) String normalName = "a" + generateBlobName() String copyName = "c" + generateBlobName() String metadataName = "m" + generateBlobName() @@ -776,7 +776,7 @@ class ContainerAPITest extends APISpec { def "List blobs flat options uncommitted"() { setup: - ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListingDetails() + ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListDetails() .withUncommittedBlobs(true)) String normalName = "a" + generateBlobName() String copyName = "c" + generateBlobName() @@ -802,7 +802,7 @@ class ContainerAPITest extends APISpec { bu.delete(null, null, null).blockingGet() when: - List blobs = cu.listBlobsFlatSegment(null, new ListBlobsOptions().withDetails(new BlobListingDetails() + List blobs = cu.listBlobsFlatSegment(null, new ListBlobsOptions().withDetails(new BlobListDetails() .withDeletedBlobs(true)), null).blockingGet().body().segment().blobItems() then: @@ -831,7 +831,7 @@ class ContainerAPITest extends APISpec { def "List blobs flat options maxResults"() { setup: - ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListingDetails().withCopy(true) + ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListDetails().withCopy(true) .withSnapshots(true).withUncommittedBlobs(true)).withMaxResults(2) String normalName = "a" + generateBlobName() String copyName = "c" + generateBlobName() @@ -930,7 +930,7 @@ class ContainerAPITest extends APISpec { def "List blobs hier options copy"() { setup: - ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListingDetails().withCopy(true)) + ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListDetails().withCopy(true)) String normalName = "a" + generateBlobName() String copyName = "c" + generateBlobName() String metadataName = "m" + generateBlobName() @@ -955,7 +955,7 @@ class ContainerAPITest extends APISpec { def "List blobs hier options metadata"() { setup: - ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListingDetails().withMetadata(true)) + ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListDetails().withMetadata(true)) String normalName = "a" + generateBlobName() String copyName = "c" + generateBlobName() String metadataName = "m" + generateBlobName() @@ -977,7 +977,7 @@ class ContainerAPITest extends APISpec { def "List blobs hier options uncommitted"() { setup: - ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListingDetails() + ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListDetails() .withUncommittedBlobs(true)) String normalName = "a" + generateBlobName() String copyName = "c" + generateBlobName() @@ -1005,7 +1005,7 @@ class ContainerAPITest extends APISpec { when: List blobs = cu.listBlobsHierarchySegment(null, "", - new ListBlobsOptions().withDetails(new BlobListingDetails().withDeletedBlobs(true)), null).blockingGet() + new ListBlobsOptions().withDetails(new BlobListDetails().withDeletedBlobs(true)), null).blockingGet() .body().segment().blobItems() then: @@ -1035,7 +1035,7 @@ class ContainerAPITest extends APISpec { def "List blobs hier options maxResults"() { setup: - ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListingDetails().withCopy(true) + ListBlobsOptions options = new ListBlobsOptions().withDetails(new BlobListDetails().withCopy(true) .withUncommittedBlobs(true)).withMaxResults(1) String normalName = "a" + generateBlobName() String copyName = "c" + generateBlobName() @@ -1054,7 +1054,7 @@ class ContainerAPITest extends APISpec { @Unroll def "List blobs hier options fail"() { when: - def options = new ListBlobsOptions().withDetails(new BlobListingDetails().withSnapshots(snapshots)) + def options = new ListBlobsOptions().withDetails(new BlobListDetails().withSnapshots(snapshots)) .withMaxResults(maxResults) cu.listBlobsHierarchySegment(null, null, options, null) diff --git a/src/test/java/com/microsoft/azure/storage/ServiceAPITest.groovy b/src/test/java/com/microsoft/azure/storage/ServiceAPITest.groovy index daa08c770adb9..e19277d1b42c7 100644 --- a/src/test/java/com/microsoft/azure/storage/ServiceAPITest.groovy +++ b/src/test/java/com/microsoft/azure/storage/ServiceAPITest.groovy @@ -106,7 +106,7 @@ class ServiceAPITest extends APISpec { expect: primaryServiceURL.listContainersSegment(null, - new ListContainersOptions().withDetails(new ContainerListingDetails().withMetadata(true)) + new ListContainersOptions().withDetails(new ContainerListDetails().withMetadata(true)) .withPrefix("aaa" + containerPrefix), null).blockingGet().body().containerItems() .get(0).metadata() == metadata // Container with prefix "aaa" will not be cleaned up by normal test cleanup.