0.5.0
Naming changes
- Getters and setters with the
get
andset
prefix have been added to all classes/builders. Older getters/setters (withoutget/set
prefix) have been deprecated - Builder factory methods
builder()
have been deprecated, you should usenewBuilder()
instead defaultInstance()
factory methods have been deprecated, you should usegetDefaultInstance()
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 viagcloud
(#1303) - Add
reset()
method toLocalDatastoreHelper
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 preventsReadChannel
from trying (and failing) to uncompress gzipped chunks (#1301)
Storage NIO
- All dependencies are now shaded in the
google-cloud-nio
shaded jar (#1327)