Skip to content

0.5.0

Compare
Choose a tag to compare
@mziccard mziccard released this 29 Oct 21:44

Naming changes

  • Getters and setters with the get and set prefix have been added to all classes/builders. Older getters/setters (without get/set prefix) have been deprecated
  • Builder factory methods builder() have been deprecated, you should use newBuilder() instead
  • defaultInstance() factory methods have been deprecated, you should use getDefaultInstance() instead

See the following example of using google-cloud-storage after the naming changes:

Storage storage = StorageOptions.getDefaultInstance().getService();
BlobId blobId = BlobId.of("bucket", "blob_name");
Blob blob = storage.get(blobId);
if (blob != null) {
  byte[] prevContent = blob.getContent();
  System.out.println(new String(prevContent, UTF_8));
  WritableByteChannel channel = blob.writer();
  channel.write(ByteBuffer.wrap("Updated content".getBytes(UTF_8)));
  channel.close();
}

Features

Datastore

  • Add support to LocalDatastoreHelper for more recent version of the Datastore emulator installed via gcloud (#1303)
  • Add reset() method to LocalDatastoreHelper to clear the status of the Datastore emulator (#1293)

PubSub

  • Add support for PubSub emulator host variable. If the PUBSUB_EMULATOR_HOST environment variable is set, the PubSub client uses it to locate the PubSub emulator. (#1317)

Fixes

Datastore

  • Allow LocalDatastoreHelper to properly cache downloaded copies of the Datastore emulator (#1302)

Storage

  • Fix regression in Storage.signUrl to support blob names containing / characters (#1346)
  • Allow Storage.reader to read gzip blobs in compressed chunks. This prevents ReadChannel from trying (and failing) to uncompress gzipped chunks (#1301)

Storage NIO

  • All dependencies are now shaded in the google-cloud-nio shaded jar (#1327)