Skip to content

Commit aca14aa

Browse files
authored
---
yaml --- r: 13171 b: refs/heads/autosynth-speech c: 2a63c96 h: refs/heads/master i: 13169: 9df5bf7 13167: 2e98154
1 parent eda2069 commit aca14aa

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ refs/heads/autosynth-redis: 4c68cb0fbc599124e717ab3f24bd8a8a5d085ca9
141141
refs/heads/autosynth-scheduler: 2f0fe714a8541dc72f88b45bddd8748e5f21cf29
142142
refs/heads/autosynth-securitycenter: 8e95447ccb176c3648880ee0cb926cd1f4065156
143143
refs/heads/autosynth-spanner: 563dc6c78c6a2579b681f441f0a9b59005212394
144-
refs/heads/autosynth-speech: ad05c812118b51dbc69a16b4aa7ecaf239a23577
144+
refs/heads/autosynth-speech: 2a63c9692500cf1586f9ba1bb26b6faf08353dc1
145145
refs/heads/autosynth-tasks: afc9f4da54964dea5e7f3a9b164db282fc35db5c
146146
refs/heads/autosynth-texttospeech: a447278ab2ec3975aab3b641549c6780eac0a07a
147147
refs/heads/autosynth-trace: 80c58aa2fb54b0a9c6876f2c21aa8d19cf55962e

branches/autosynth-speech/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -907,11 +907,11 @@ public boolean requesterPays(String bucketName) {
907907
// instead of true/false, this method returns true/null.
908908
Boolean isRP = storage.get(bucketName).requesterPays();
909909
return isRP != null && isRP.booleanValue();
910-
} catch (StorageException sex) {
911-
if (sex.getCode() == 400 && sex.getMessage().contains("Bucket is requester pays")) {
910+
} catch (StorageException ex) {
911+
if (ex.getCode() == 400 && ex.getMessage().contains("Bucket is requester pays")) {
912912
return true;
913913
}
914-
throw sex;
914+
throw ex;
915915
}
916916
}
917917

branches/autosynth-speech/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/it/ITGcsNio.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ public void testFileExistsRequesterPaysNoUserProject() throws IOException {
166166
// fails because we must pay for every access, including metadata.
167167
Files.exists(path);
168168
Assert.fail("It should have thrown an exception.");
169-
} catch (StorageException sex) {
170-
assertIsRequesterPaysException("testFileExistsRequesterPaysNoUserProject", sex);
169+
} catch (StorageException ex) {
170+
assertIsRequesterPaysException("testFileExistsRequesterPaysNoUserProject", ex);
171171
}
172172
}
173173

@@ -196,8 +196,8 @@ public void testCantCreateWithoutUserProject() throws IOException {
196196
// fails
197197
Files.write(path, "I would like to write".getBytes());
198198
Assert.fail("It should have thrown an exception.");
199-
} catch (StorageException sex) {
200-
assertIsRequesterPaysException("testCantCreateWithoutUserProject", sex);
199+
} catch (StorageException ex) {
200+
assertIsRequesterPaysException("testCantCreateWithoutUserProject", ex);
201201
}
202202
}
203203

@@ -218,8 +218,8 @@ public void testCantReadWithoutUserProject() throws IOException {
218218
// fails
219219
Files.readAllBytes(path);
220220
Assert.fail("It should have thrown an exception.");
221-
} catch (StorageException sex) {
222-
assertIsRequesterPaysException("testCantReadWithoutUserProject", sex);
221+
} catch (StorageException ex) {
222+
assertIsRequesterPaysException("testCantReadWithoutUserProject", ex);
223223
}
224224
}
225225

@@ -269,8 +269,8 @@ private void innerTestCantCopyWithoutUserProject(
269269
description,
270270
hex.getMessage()
271271
.contains("Bucket is requester pays bucket but no user project provided"));
272-
} catch (StorageException sex) {
273-
assertIsRequesterPaysException(description, sex);
272+
} catch (StorageException ex) {
273+
assertIsRequesterPaysException(description, ex);
274274
}
275275
}
276276

@@ -317,11 +317,11 @@ public void testAutodetectWhenNotRequesterPays() throws IOException {
317317
"");
318318
}
319319

320-
private void assertIsRequesterPaysException(String message, StorageException sex) {
321-
Assert.assertEquals(message, sex.getCode(), 400);
320+
private void assertIsRequesterPaysException(String message, StorageException ex) {
321+
Assert.assertEquals(message, ex.getCode(), 400);
322322
Assert.assertTrue(
323323
message,
324-
sex.getMessage().contains("Bucket is requester pays bucket but no user project provided"));
324+
ex.getMessage().contains("Bucket is requester pays bucket but no user project provided"));
325325
}
326326

327327
// End of tests related to the "requester pays" feature

0 commit comments

Comments
 (0)