Skip to content

Commit c244d75

Browse files
committed
---
yaml --- r: 6307 b: refs/heads/tswast-patch-1 c: 3011587 h: refs/heads/master i: 6305: 8bb554d 6303: 2358851
1 parent bd8c1e0 commit c244d75

21 files changed

Lines changed: 73 additions & 73 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: 3310a826c7c107b05ad06cc7c52e349b773368c0
60+
refs/heads/tswast-patch-1: 301158716e84080b654dd47e623f35f0ef845087
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Add this to your pom.xml file
2525
<dependency>
2626
<groupId>com.google.gcloud</groupId>
2727
<artifactId>gcloud-java</artifactId>
28-
<version>0.0.10</version>
28+
<version>0.0.9</version>
2929
</dependency>
3030
```
3131

branches/tswast-patch-1/gcloud-java-core/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Add this to your pom.xml file
1717
<dependency>
1818
<groupId>com.google.gcloud</groupId>
1919
<artifactId>gcloud-java-core</artifactId>
20-
<version>0.0.10</version>
20+
<version>0.0.9</version>
2121
</dependency>
2222
```
2323

branches/tswast-patch-1/gcloud-java-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>com.google.gcloud</groupId>
1313
<artifactId>gcloud-java-pom</artifactId>
14-
<version>0.0.11-SNAPSHOT</version>
14+
<version>0.0.10-SNAPSHOT</version>
1515
</parent>
1616
<dependencies>
1717
<dependency>

branches/tswast-patch-1/gcloud-java-datastore/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Add this to your pom.xml file
2020
<dependency>
2121
<groupId>com.google.gcloud</groupId>
2222
<artifactId>gcloud-java-datastore</artifactId>
23-
<version>0.0.10</version>
23+
<version>0.0.9</version>
2424
</dependency>
2525
```
2626

branches/tswast-patch-1/gcloud-java-datastore/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>com.google.gcloud</groupId>
1313
<artifactId>gcloud-java-pom</artifactId>
14-
<version>0.0.11-SNAPSHOT</version>
14+
<version>0.0.10-SNAPSHOT</version>
1515
</parent>
1616
<dependencies>
1717
<dependency>

branches/tswast-patch-1/gcloud-java-examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Add this to your pom.xml file
1717
<dependency>
1818
<groupId>com.google.gcloud</groupId>
1919
<artifactId>gcloud-java-examples</artifactId>
20-
<version>0.0.10</version>
20+
<version>0.0.9</version>
2121
</dependency>
2222
```
2323

branches/tswast-patch-1/gcloud-java-examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>com.google.gcloud</groupId>
1313
<artifactId>gcloud-java-pom</artifactId>
14-
<version>0.0.11-SNAPSHOT</version>
14+
<version>0.0.10-SNAPSHOT</version>
1515
</parent>
1616
<dependencies>
1717
<dependency>

branches/tswast-patch-1/gcloud-java-examples/src/main/java/com/google/gcloud/examples/StorageExample.java

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import java.security.UnrecoverableKeyException;
5353
import java.security.cert.CertificateException;
5454
import java.util.Arrays;
55-
import java.util.Calendar;
5655
import java.util.HashMap;
5756
import java.util.Map;
5857
import java.util.concurrent.TimeUnit;
@@ -96,22 +95,6 @@ protected String params() {
9695
}
9796
}
9897

99-
private static abstract class BlobAction extends StorageAction<Blob> {
100-
101-
@Override
102-
Blob parse(Storage storage, String... args) {
103-
if (args.length != 2) {
104-
throw new IllegalArgumentException();
105-
}
106-
return new Blob(storage, args[0], args[1]);
107-
}
108-
109-
@Override
110-
public String params() {
111-
return "<bucket> <path>";
112-
}
113-
}
114-
11598
private static abstract class BlobsAction extends StorageAction<Blob[]> {
11699

117100
@Override
@@ -121,7 +104,7 @@ Blob[] parse(Storage storage, String... args) {
121104
}
122105
Blob[] blobs = new Blob[args.length - 1];
123106
for (int i = 1; i < args.length; i++) {
124-
blobs[i - 1] = new Blob(storage, args[0], args[i]);
107+
blobs[i - 1] = Blob.load(storage, args[0], args[i]);
125108
}
126109
return blobs;
127110
}
@@ -145,11 +128,11 @@ public void run(Storage storage, Blob... blobs) {
145128
if (blobs.length == 1) {
146129
if (blobs[0].info().name().isEmpty()) {
147130
// get Bucket
148-
Bucket bucket = new Bucket(storage, blobs[0].info().bucket());
149-
System.out.println("Bucket info: " + bucket.reload().info());
131+
Bucket bucket = Bucket.load(storage, blobs[0].info().bucket());
132+
System.out.println("Bucket info: " + bucket.info());
150133
} else {
151134
// get Blob
152-
System.out.println("Blob info: " + blobs[0].reload().info());
135+
System.out.println("Blob info: " + blobs[0].info());
153136
}
154137
} else {
155138
// use batch to get multiple blobs.
@@ -167,7 +150,7 @@ public void run(Storage storage, Blob... blobs) {
167150
@Override
168151
Blob[] parse(Storage storage, String... args) {
169152
if (args.length < 2) {
170-
return new Blob[] {new Blob(storage, args[0], "")};
153+
return new Blob[] {new Blob(storage, BlobInfo.builder(args[0], "").build())};
171154
}
172155
return super.parse(storage, args);
173156
}
@@ -239,7 +222,7 @@ public void run(Storage storage, String bucketName) {
239222
}
240223
} else {
241224
// list a bucket's blobs
242-
Bucket bucket = new Bucket(storage, bucketName);
225+
Bucket bucket = Bucket.load(storage, bucketName);
243226
for (Blob b : bucket.list()) {
244227
System.out.println(b.info());
245228
}
@@ -321,7 +304,6 @@ public void run(Storage storage, Tuple<Blob, Path> tuple) throws IOException {
321304
}
322305

323306
private void run(Storage storage, Blob blob, Path downloadTo) throws IOException {
324-
blob = blob.reload();
325307
if (!blob.exists()) {
326308
System.out.println("No such object");
327309
return;
@@ -367,7 +349,7 @@ Tuple<Blob, Path> parse(Storage storage, String... args) {
367349
} else {
368350
path = null;
369351
}
370-
return Tuple.of(new Blob(storage, args[0], args[1]), path);
352+
return Tuple.of(Blob.load(storage, args[0], args[1]), path);
371353
}
372354

373355
@Override
@@ -448,7 +430,6 @@ public void run(Storage storage, Tuple<Blob, Map<String, String>> tuple)
448430
}
449431

450432
private void run(Storage storage, Blob blob, Map<String, String> metadata) {
451-
blob = blob.reload();
452433
if (!blob.exists()) {
453434
System.out.println("No such object");
454435
return;
@@ -462,7 +443,7 @@ Tuple<Blob, Map<String, String>> parse(Storage storage, String... args) {
462443
if (args.length < 2) {
463444
throw new IllegalArgumentException();
464445
}
465-
Blob blob = new Blob(storage, args[0], args[1]);
446+
Blob blob = Blob.load(storage, args[0], args[1]);
466447
Map<String, String> metadata = new HashMap<>();
467448
for (int i = 2; i < args.length; i++) {
468449
int idx = args[i].indexOf('=');
@@ -515,7 +496,7 @@ Tuple<ServiceAccountAuthCredentials, Blob> parse(Storage storage, String... args
515496
keystore.load(Files.newInputStream(Paths.get(args[0])), PASSWORD);
516497
PrivateKey privateKey = (PrivateKey) keystore.getKey("privatekey", PASSWORD);
517498
ServiceAccountAuthCredentials cred = AuthCredentials.createFor(args[1], privateKey);
518-
return Tuple.of(cred, new Blob(storage, args[2], args[3]));
499+
return Tuple.of(cred, Blob.load(storage, args[2], args[3]));
519500
}
520501

521502
@Override

branches/tswast-patch-1/gcloud-java-storage/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Add this to your pom.xml file
2020
<dependency>
2121
<groupId>com.google.gcloud</groupId>
2222
<artifactId>gcloud-java-storage</artifactId>
23-
<version>0.0.10</version>
23+
<version>0.0.9</version>
2424
</dependency>
2525
```
2626

0 commit comments

Comments
 (0)