Skip to content

Commit 37bf4ec

Browse files
author
Dhriti Chopra
committed
fix: Updating version and formatting code
1 parent b900983 commit 37bf4ec

File tree

7 files changed

+197
-172
lines changed

7 files changed

+197
-172
lines changed

google-cloud-storage/src/main/java/com/google/cloud/storage/ChecksumResponseParser.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ private ChecksumResponseParser() {}
3636
static UploadPartResponse parseUploadResponse(HttpResponse response) {
3737
String eTag = response.getHeaders().getETag();
3838
Map<String, String> hashes = extractHashesFromHeader(response);
39-
return UploadPartResponse.builder().eTag(eTag).md5(hashes.get("md5")).crc32c(hashes.get("crc32c")).build();
39+
return UploadPartResponse.builder()
40+
.eTag(eTag)
41+
.md5(hashes.get("md5"))
42+
.crc32c(hashes.get("crc32c"))
43+
.build();
4044
}
4145

4246
static CompleteMultipartUploadResponse parseCompleteResponse(HttpResponse response)

google-cloud-storage/src/main/java/com/google/cloud/storage/MultipartUploadClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,4 @@ public static MultipartUploadClient create(MultipartUploadSettings config) {
129129
MultipartUploadHttpRequestManager.createFrom(options),
130130
options.getRetryAlgorithmManager());
131131
}
132-
}
132+
}

google-cloud-storage/src/main/java/com/google/cloud/storage/MultipartUploadHttpRequestManager.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,29 +117,29 @@ ListMultipartUploadsResponse sendListMultipartUploadsRequest(
117117
URI uri, ListMultipartUploadsRequest request) throws IOException {
118118

119119
ImmutableMap.Builder<String, Object> params =
120-
ImmutableMap.<String, Object>builder()
121-
.put("bucket", request.bucket());
122-
if(request.delimiter() != null){
120+
ImmutableMap.<String, Object>builder().put("bucket", request.bucket());
121+
if (request.delimiter() != null) {
123122
params.put("delimiter", request.delimiter());
124123
}
125-
if(request.encodingType() != null){
124+
if (request.encodingType() != null) {
126125
params.put("encoding-type", request.encodingType());
127126
}
128-
if(request.keyMarker() != null){
127+
if (request.keyMarker() != null) {
129128
params.put("key-marker", request.keyMarker());
130129
}
131-
if(request.maxUploads() != null){
130+
if (request.maxUploads() != null) {
132131
params.put("max-uploads", request.maxUploads());
133132
}
134-
if(request.prefix() != null){
133+
if (request.prefix() != null) {
135134
params.put("prefix", request.prefix());
136135
}
137-
if(request.uploadIdMarker() != null){
136+
if (request.uploadIdMarker() != null) {
138137
params.put("upload-id-marker", request.uploadIdMarker());
139138
}
140139
String listUri =
141140
UriTemplate.expand(
142-
uri.toString() + "{bucket}?uploads{delimiter,encoding-type,key-marker,max-uploads,prefix,upload-id-marker}",
141+
uri.toString()
142+
+ "{bucket}?uploads{delimiter,encoding-type,key-marker,max-uploads,prefix,upload-id-marker}",
143143
params.build(),
144144
false);
145145
System.out.println(listUri);

google-cloud-storage/src/main/java/com/google/cloud/storage/multipartupload/model/ListMultipartUploadsRequest.java

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* @see <a href="https://cloud.google.com/storage/docs/multipart-uploads#listing-uploads">Listing
2626
* multipart uploads</a>
27-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
27+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
2828
*/
2929
@BetaApi
3030
public final class ListMultipartUploadsRequest {
@@ -58,7 +58,7 @@ private ListMultipartUploadsRequest(
5858
* The bucket to list multipart uploads from.
5959
*
6060
* @return The bucket name.
61-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
61+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
6262
*/
6363
@BetaApi
6464
public String bucket() {
@@ -69,7 +69,7 @@ public String bucket() {
6969
* Character used to group keys.
7070
*
7171
* @return The delimiter.
72-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
72+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
7373
*/
7474
@BetaApi
7575
public String delimiter() {
@@ -80,7 +80,7 @@ public String delimiter() {
8080
* The encoding type used by Cloud Storage to encode object names in the response.
8181
*
8282
* @return The encoding type.
83-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
83+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
8484
*/
8585
@BetaApi
8686
public String encodingType() {
@@ -92,7 +92,7 @@ public String encodingType() {
9292
* should begin.
9393
*
9494
* @return The key marker.
95-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
95+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
9696
*/
9797
@BetaApi
9898
public String keyMarker() {
@@ -103,7 +103,7 @@ public String keyMarker() {
103103
* The maximum number of multipart uploads to return.
104104
*
105105
* @return The maximum number of uploads.
106-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
106+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
107107
*/
108108
@BetaApi
109109
public Integer maxUploads() {
@@ -114,7 +114,7 @@ public Integer maxUploads() {
114114
* Filters results to multipart uploads whose keys begin with this prefix.
115115
*
116116
* @return The prefix.
117-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
117+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
118118
*/
119119
@BetaApi
120120
public String prefix() {
@@ -126,7 +126,7 @@ public String prefix() {
126126
* begin.
127127
*
128128
* @return The upload ID marker.
129-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
129+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
130130
*/
131131
@BetaApi
132132
public String uploadIdMarker() {
@@ -153,7 +153,8 @@ public boolean equals(Object o) {
153153

154154
@Override
155155
public int hashCode() {
156-
return Objects.hash(bucket, delimiter, encodingType, keyMarker, maxUploads, prefix, uploadIdMarker);
156+
return Objects.hash(
157+
bucket, delimiter, encodingType, keyMarker, maxUploads, prefix, uploadIdMarker);
157158
}
158159

159160
@Override
@@ -174,7 +175,7 @@ public String toString() {
174175
* Returns a new builder for this request.
175176
*
176177
* @return A new builder.
177-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
178+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
178179
*/
179180
@BetaApi
180181
public static Builder builder() {
@@ -184,7 +185,7 @@ public static Builder builder() {
184185
/**
185186
* A builder for {@link ListMultipartUploadsRequest}.
186187
*
187-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
188+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
188189
*/
189190
@BetaApi
190191
public static final class Builder {
@@ -203,7 +204,7 @@ private Builder() {}
203204
*
204205
* @param bucket The bucket name.
205206
* @return This builder.
206-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
207+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
207208
*/
208209
@BetaApi
209210
public Builder bucket(String bucket) {
@@ -216,7 +217,7 @@ public Builder bucket(String bucket) {
216217
*
217218
* @param delimiter The delimiter.
218219
* @return This builder.
219-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
220+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
220221
*/
221222
@BetaApi
222223
public Builder delimiter(String delimiter) {
@@ -229,7 +230,7 @@ public Builder delimiter(String delimiter) {
229230
*
230231
* @param encodingType The encoding type.
231232
* @return This builder.
232-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
233+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
233234
*/
234235
@BetaApi
235236
public Builder encodingType(String encodingType) {
@@ -242,7 +243,7 @@ public Builder encodingType(String encodingType) {
242243
*
243244
* @param keyMarker The key marker.
244245
* @return This builder.
245-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
246+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
246247
*/
247248
@BetaApi
248249
public Builder keyMarker(String keyMarker) {
@@ -255,7 +256,7 @@ public Builder keyMarker(String keyMarker) {
255256
*
256257
* @param maxUploads The maximum number of uploads.
257258
* @return This builder.
258-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
259+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
259260
*/
260261
@BetaApi
261262
public Builder maxUploads(Integer maxUploads) {
@@ -268,7 +269,7 @@ public Builder maxUploads(Integer maxUploads) {
268269
*
269270
* @param prefix The prefix.
270271
* @return This builder.
271-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
272+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
272273
*/
273274
@BetaApi
274275
public Builder prefix(String prefix) {
@@ -281,7 +282,7 @@ public Builder prefix(String prefix) {
281282
*
282283
* @param uploadIdMarker The upload ID marker.
283284
* @return This builder.
284-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
285+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
285286
*/
286287
@BetaApi
287288
public Builder uploadIdMarker(String uploadIdMarker) {
@@ -293,7 +294,7 @@ public Builder uploadIdMarker(String uploadIdMarker) {
293294
* Builds the request.
294295
*
295296
* @return The built request.
296-
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
297+
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
297298
*/
298299
@BetaApi
299300
public ListMultipartUploadsRequest build() {

0 commit comments

Comments
 (0)