> {
OptionsT options();
diff --git a/gcloud-java-core/src/main/java/com/google/gcloud/ServiceFactory.java b/gcloud-java-core/src/main/java/com/google/gcloud/ServiceFactory.java
index 6226fdb504c3..1727e9c3976f 100644
--- a/gcloud-java-core/src/main/java/com/google/gcloud/ServiceFactory.java
+++ b/gcloud-java-core/src/main/java/com/google/gcloud/ServiceFactory.java
@@ -22,8 +22,8 @@
* Implementation must provide a public no-arg constructor.
* Loading of a factory implementation is done via {@link java.util.ServiceLoader}.
*
- * @param the service subclass.
- * @param the {@code ServiceOptions} subclass corresponding to the service.
+ * @param the service subclass
+ * @param the {@code ServiceOptions} subclass corresponding to the service
*/
@SuppressWarnings("rawtypes")
public interface ServiceFactory {
diff --git a/gcloud-java-core/src/main/java/com/google/gcloud/ServiceOptions.java b/gcloud-java-core/src/main/java/com/google/gcloud/ServiceOptions.java
index 588c041eb602..6ed1d50ba364 100644
--- a/gcloud-java-core/src/main/java/com/google/gcloud/ServiceOptions.java
+++ b/gcloud-java-core/src/main/java/com/google/gcloud/ServiceOptions.java
@@ -56,9 +56,9 @@
/**
* Abstract class representing service options.
*
- * @param the service subclass.
- * @param the spi-layer class corresponding to the service.
- * @param the {@code ServiceOptions} subclass corresponding to the service.
+ * @param the service subclass
+ * @param the spi-layer class corresponding to the service
+ * @param the {@code ServiceOptions} subclass corresponding to the service
*/
public abstract class ServiceOptions, ServiceRpcT,
OptionsT extends ServiceOptions> implements Serializable {
@@ -160,10 +160,10 @@ private Object readResolve() throws ObjectStreamException {
/**
* Builder for {@code ServiceOptions}.
*
- * @param the service subclass.
- * @param the spi-layer class corresponding to the service.
- * @param the {@code ServiceOptions} subclass corresponding to the service.
- * @param the {@code ServiceOptions} builder.
+ * @param the service subclass
+ * @param the spi-layer class corresponding to the service
+ * @param the {@code ServiceOptions} subclass corresponding to the service
+ * @param the {@code ServiceOptions} builder
*/
protected abstract static class Builder, ServiceRpcT,
OptionsT extends ServiceOptions,
@@ -215,7 +215,7 @@ public B serviceFactory(ServiceFactory serviceFactory) {
* replaced by Java8's {@code java.time.Clock}.
*
* @param clock the clock to set
- * @return the builder.
+ * @return the builder
*/
public B clock(Clock clock) {
this.clock = clock;
@@ -225,7 +225,7 @@ public B clock(Clock clock) {
/**
* Sets project id.
*
- * @return the builder.
+ * @return the builder
*/
public B projectId(String projectId) {
this.projectId = projectId;
@@ -235,7 +235,7 @@ public B projectId(String projectId) {
/**
* Sets service host.
*
- * @return the builder.
+ * @return the builder
*/
public B host(String host) {
this.host = host;
@@ -245,7 +245,7 @@ public B host(String host) {
/**
* Sets the transport factory.
*
- * @return the builder.
+ * @return the builder
*/
public B httpTransportFactory(HttpTransportFactory httpTransportFactory) {
this.httpTransportFactory = httpTransportFactory;
@@ -255,7 +255,7 @@ public B httpTransportFactory(HttpTransportFactory httpTransportFactory) {
/**
* Sets the service authentication credentials.
*
- * @return the builder.
+ * @return the builder
*/
public B authCredentials(AuthCredentials authCredentials) {
this.authCredentials = authCredentials;
@@ -266,7 +266,7 @@ public B authCredentials(AuthCredentials authCredentials) {
* Sets configuration parameters for request retries. If no configuration is set
* {@link RetryParams#noRetries()} is used.
*
- * @return the builder.
+ * @return the builder
*/
public B retryParams(RetryParams retryParams) {
this.retryParams = retryParams;
@@ -288,7 +288,7 @@ public B serviceRpcFactory(ServiceRpcFactory serviceRpcFa
*
* @param connectTimeout connection timeout in milliseconds. 0 for an infinite timeout, a
* negative number for the default value (20000).
- * @return the builder.
+ * @return the builder
*/
public B connectTimeout(int connectTimeout) {
this.connectTimeout = connectTimeout;
@@ -300,7 +300,7 @@ public B connectTimeout(int connectTimeout) {
*
* @param readTimeout read timeout in milliseconds. 0 for an infinite timeout, a negative number
* for the default value (20000).
- * @return the builder.
+ * @return the builder
*/
public B readTimeout(int readTimeout) {
this.readTimeout = readTimeout;
@@ -341,7 +341,7 @@ protected ServiceOptions(Class extends ServiceFactory> ser
* Returns whether a service requires a project ID. This method may be overridden in
* service-specific Options objects.
*
- * @return true if a project ID is required to use the service, false if not.
+ * @return true if a project ID is required to use the service, false if not
*/
protected boolean projectIdRequired() {
return true;
diff --git a/gcloud-java-datastore/README.md b/gcloud-java-datastore/README.md
index fa9eb22bf6fa..50b6451a71a0 100644
--- a/gcloud-java-datastore/README.md
+++ b/gcloud-java-datastore/README.md
@@ -44,7 +44,7 @@ See the [Authentication](https://github.com/GoogleCloudPlatform/gcloud-java#auth
About Google Cloud Datastore
----------------------------
-Google [Cloud Datastore][cloud-datastore] is a fully managed, schemaless database for
+Google [Cloud Datastore][cloud-datastore-docs] is a fully managed, schemaless database for
storing non-relational data. Cloud Datastore automatically scales with
your users and supports ACID transactions, high availability of reads and
writes, strong consistency for reads and ancestor queries, and eventual
@@ -77,7 +77,7 @@ Datastore datastore = DatastoreOptions.defaultInstance().service();
For other authentication options, see the [Authentication](https://github.com/GoogleCloudPlatform/gcloud-java#authentication) page.
#### Storing data
-Objects in Datastore are known as entities. Entities are grouped by "kind" and have keys for easy access. In this code snippet, we will create a new entity representing a person and store that data by the person's name. First, add the following imports at the top of your file:
+Objects in Datastore are known as entities. Entities are grouped by "kind" and have keys for easy access. In this code snippet, we will create a new entity representing a person and store that data by the person's email. First, add the following imports at the top of your file:
```java
import com.google.gcloud.datastore.Entity;
@@ -89,8 +89,9 @@ Then add the following code to put an entity in Datastore.
```java
KeyFactory keyFactory = datastore.newKeyFactory().kind("Person");
-Key key = keyFactory.newKey("John Doe");
+Key key = keyFactory.newKey("john.doe@gmail.com");
Entity entity = Entity.builder(key)
+ .set("name", "John Doe")
.set("age", 51)
.set("favorite_food", "pizza")
.build();
@@ -125,6 +126,7 @@ Query query = Query.entityQueryBuilder()
QueryResults results = datastore.run(query);
while (results.hasNext()) {
Entity currentEntity = results.next();
+ System.out.println(currentEntity.getString("name") + ", you're invited to a pizza party!");
}
```
@@ -132,7 +134,7 @@ Cloud Datastore relies on indexing to run queries. Indexing is turned on by defa
#### Complete source code
-Here we put together all the code shown above into one program. This program assumes that you are running on Compute Engine or from your own desktop. To run this example on App Engine, simply move the code from the main method to your application's servlet class.
+Here we put together all the code shown above into one program. This program assumes that you are running on Compute Engine or from your own desktop. To run this example on App Engine, move this code to your application's servlet class and print the query output to the webpage instead of `System.out`.
```java
import com.google.gcloud.datastore.Datastore;
@@ -145,7 +147,7 @@ import com.google.gcloud.datastore.QueryResults;
import com.google.gcloud.datastore.StructuredQuery;
import com.google.gcloud.datastore.StructuredQuery.PropertyFilter;
-public class GcloudJavaDatastoreExample {
+public class GcloudDatastoreExample {
public static void main(String[] args) {
// Create datastore service object.
@@ -154,8 +156,9 @@ public class GcloudJavaDatastoreExample {
// Add an entity to Datastore
KeyFactory keyFactory = datastore.newKeyFactory().kind("Person");
- Key key = keyFactory.newKey("John Doe");
+ Key key = keyFactory.newKey("john.doe@gmail.com");
Entity entity = Entity.builder(key)
+ .set("name", "John Doe")
.set("age", 51)
.set("favorite_food", "pizza")
.build();
@@ -165,13 +168,15 @@ public class GcloudJavaDatastoreExample {
Entity johnEntity = datastore.get(key);
// Add a couple more entities to make the query results more interesting
- Key janeKey = keyFactory.newKey("Jane Doe");
+ Key janeKey = keyFactory.newKey("jane.doe@gmail.com");
Entity janeEntity = Entity.builder(janeKey)
+ .set("name", "Jane Doe")
.set("age", 44)
.set("favorite_food", "pizza")
.build();
- Key joeKey = keyFactory.newKey("Joe Shmoe");
+ Key joeKey = keyFactory.newKey("joe.shmoe@gmail.com");
Entity joeEntity = Entity.builder(joeKey)
+ .set("name", "Joe Shmoe")
.set("age", 27)
.set("favorite_food", "sushi")
.build();
@@ -185,7 +190,7 @@ public class GcloudJavaDatastoreExample {
QueryResults results = datastore.run(query);
while (results.hasNext()) {
Entity currentEntity = results.next();
- // Do something using the entity. (e.g. send an invite a pizza party)
+ System.out.println(currentEntity.getString("name") + ", you're invited to a pizza party!");
}
}
}
@@ -237,8 +242,6 @@ Apache 2.0 - See [LICENSE] for more information.
[LICENSE]: https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/LICENSE
[TESTING]: https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/TESTING.md#testing-code-that-uses-datastore
[cloud-platform]: https://cloud.google.com/
-[cloud-datastore]: https://cloud.google.com/datastore/docs
[cloud-datastore-docs]: https://cloud.google.com/datastore/docs
[cloud-datastore-activation]: https://cloud.google.com/datastore/docs/activate
[datastore-api]: http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/datastore/package-summary.html
-
diff --git a/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/BaseEntity.java b/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/BaseEntity.java
index ea8c6f5af6ff..d674a5e242ad 100644
--- a/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/BaseEntity.java
+++ b/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/BaseEntity.java
@@ -243,7 +243,7 @@ public boolean contains(String name) {
/**
* Returns the {@link Value} for the given property {@code name}.
*
- * @throws DatastoreException if not such property.
+ * @throws DatastoreException if not such property
*/
public > V getValue(String name) {
@SuppressWarnings("unchecked")
@@ -257,7 +257,7 @@ public > V getValue(String name) {
/**
* Returns true if property is an instance of NullValue.
*
- * @throws DatastoreException if not such property.
+ * @throws DatastoreException if not such property
*/
public boolean isNull(String name) {
return getValue(name) instanceof NullValue;
@@ -267,8 +267,8 @@ public boolean isNull(String name) {
/**
* Returns the property value as a string.
*
- * @throws DatastoreException if not such property.
- * @throws ClassCastException if value is not a string.
+ * @throws DatastoreException if not such property
+ * @throws ClassCastException if value is not a string
*/
@SuppressWarnings("unchecked")
public String getString(String name) {
@@ -278,8 +278,8 @@ public String getString(String name) {
/**
* Returns the property value as long.
*
- * @throws DatastoreException if not such property.
- * @throws ClassCastException if value is not a long.
+ * @throws DatastoreException if not such property
+ * @throws ClassCastException if value is not a long
*/
@SuppressWarnings("unchecked")
public long getLong(String name) {
@@ -289,8 +289,8 @@ public long getLong(String name) {
/**
* Returns the property value as a double.
*
- * @throws DatastoreException if not such property.
- * @throws ClassCastException if value is not a double.
+ * @throws DatastoreException if not such property
+ * @throws ClassCastException if value is not a double
*/
@SuppressWarnings("unchecked")
public double getDouble(String name) {
@@ -300,8 +300,8 @@ public double getDouble(String name) {
/**
* Returns the property value as a boolean.
*
- * @throws DatastoreException if not such property.
- * @throws ClassCastException if value is not a boolean.
+ * @throws DatastoreException if not such property
+ * @throws ClassCastException if value is not a boolean
*/
@SuppressWarnings("unchecked")
public boolean getBoolean(String name) {
@@ -311,8 +311,8 @@ public boolean getBoolean(String name) {
/**
* Returns the property value as a DateTime.
*
- * @throws DatastoreException if not such property.
- * @throws ClassCastException if value is not a DateTime.
+ * @throws DatastoreException if not such property
+ * @throws ClassCastException if value is not a DateTime
*/
@SuppressWarnings("unchecked")
public DateTime getDateTime(String name) {
@@ -322,8 +322,8 @@ public DateTime getDateTime(String name) {
/**
* Returns the property value as a Key.
*
- * @throws DatastoreException if not such property.
- * @throws ClassCastException if value is not a Key.
+ * @throws DatastoreException if not such property
+ * @throws ClassCastException if value is not a Key
*/
@SuppressWarnings("unchecked")
public Key getKey(String name) {
@@ -333,8 +333,8 @@ public Key getKey(String name) {
/**
* Returns the property value as an entity.
*
- * @throws DatastoreException if not such property.
- * @throws ClassCastException if value is not an entity.
+ * @throws DatastoreException if not such property
+ * @throws ClassCastException if value is not an entity
*/
@SuppressWarnings("unchecked")
public FullEntity getEntity(String name) {
@@ -344,8 +344,8 @@ public FullEntity getEntity(String name) {
/**
* Returns the property value as a list of values.
*
- * @throws DatastoreException if not such property.
- * @throws ClassCastException if value is not a list of values.
+ * @throws DatastoreException if not such property
+ * @throws ClassCastException if value is not a list of values
*/
@SuppressWarnings("unchecked")
public List extends Value>> getList(String name) {
@@ -355,8 +355,8 @@ public List extends Value>> getList(String name) {
/**
* Returns the property value as a blob.
*
- * @throws DatastoreException if not such property.
- * @throws ClassCastException if value is not a blob.
+ * @throws DatastoreException if not such property
+ * @throws ClassCastException if value is not a blob
*/
@SuppressWarnings("unchecked")
public Blob getBlob(String name) {
diff --git a/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/Blob.java b/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/Blob.java
index 299deab3e964..42a98e60b5e6 100644
--- a/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/Blob.java
+++ b/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/Blob.java
@@ -109,7 +109,7 @@ public InputStream asInputStream() {
*
* @throws java.nio.ReadOnlyBufferException if the target is read-only
* @throws java.nio.BufferOverflowException if the target's remaining() space is not large
- * enough to hold the data.
+ * enough to hold the data
*/
public void copyTo(ByteBuffer target) {
byteString.copyTo(target);
diff --git a/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/DatastoreReader.java b/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/DatastoreReader.java
index 056895f850e3..4852dd53e16c 100644
--- a/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/DatastoreReader.java
+++ b/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/DatastoreReader.java
@@ -27,7 +27,7 @@ public interface DatastoreReader {
/**
* Returns an {@link Entity} for the given {@link Key} or {@code null} if does not exists.
*
- * @throws DatastoreException upon failure.
+ * @throws DatastoreException upon failure
*/
Entity get(Key key);
@@ -38,7 +38,7 @@ public interface DatastoreReader {
* from the returned {@code Iterator}'s {@link Iterator#hasNext hasNext} or
* {@link Iterator#next next} methods.
*
- * @throws DatastoreException upon failure.
+ * @throws DatastoreException upon failure
* @see #get(Key)
*/
Iterator get(Key... key);
@@ -53,7 +53,7 @@ public interface DatastoreReader {
/**
* Submit a {@link Query} and returns its result.
*
- * @throws DatastoreException upon failure.
+ * @throws DatastoreException upon failure
*/
QueryResults run(Query query);
}
diff --git a/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/KeyFactory.java b/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/KeyFactory.java
index 28f852ed5355..a440992870df 100644
--- a/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/KeyFactory.java
+++ b/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/KeyFactory.java
@@ -58,7 +58,7 @@ public Key newKey(long id) {
/**
* Resets the KeyFactory to its initial state.
- * @return {@code this} for chaining.
+ * @return {@code this} for chaining
*/
public KeyFactory reset() {
projectId(pi);
diff --git a/gcloud-java-examples/src/main/java/com/google/gcloud/examples/BigQueryExample.java b/gcloud-java-examples/src/main/java/com/google/gcloud/examples/BigQueryExample.java
index a1190c705faf..1754be4df7dc 100644
--- a/gcloud-java-examples/src/main/java/com/google/gcloud/examples/BigQueryExample.java
+++ b/gcloud-java-examples/src/main/java/com/google/gcloud/examples/BigQueryExample.java
@@ -58,7 +58,8 @@
* login using gcloud SDK - {@code gcloud auth login}.
* compile using maven - {@code mvn compile}
* run using maven -
- * {@code mvn exec:java -Dexec.mainClass="com.google.gcloud.examples.BigQueryExample" -Dexec.args="[]
+ * {@code mvn exec:java -Dexec.mainClass="com.google.gcloud.examples.BigQueryExample"
+ * -Dexec.args="[]
* list datasets |
* list tables |
* list jobs |
diff --git a/gcloud-java-examples/src/main/java/com/google/gcloud/examples/StorageExample.java b/gcloud-java-examples/src/main/java/com/google/gcloud/examples/StorageExample.java
index deaedfa7f027..3ef8f8b4cc32 100644
--- a/gcloud-java-examples/src/main/java/com/google/gcloud/examples/StorageExample.java
+++ b/gcloud-java-examples/src/main/java/com/google/gcloud/examples/StorageExample.java
@@ -67,7 +67,8 @@
* login using gcloud SDK - {@code gcloud auth login}.
* compile using maven - {@code mvn compile}
* run using maven -
- * {@code mvn exec:java -Dexec.mainClass="com.google.gcloud.examples.StorageExample" -Dexec.args="[]
+ * {@code mvn exec:java -Dexec.mainClass="com.google.gcloud.examples.StorageExample"
+ * -Dexec.args="[]
* list [] |
* info [ []] |
* download [local_file] |
diff --git a/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/Project.java b/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/Project.java
index b0e3582e8606..a3ff354b4a53 100644
--- a/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/Project.java
+++ b/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/Project.java
@@ -65,9 +65,10 @@ public ResourceManager resourceManager() {
}
/**
- * Returns a Project object with updated project information.
+ * Fetches the current project's latest information. Returns {@code null} if the job does not
+ * exist.
*
- * @return Project object containing the project's updated metadata or {@code null} if not found
+ * @return Project containing the project's updated metadata or {@code null} if not found
* @throws ResourceManagerException upon failure
*/
public Project reload() {
diff --git a/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/ResourceManager.java b/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/ResourceManager.java
index 5d9840362037..3d658d18d28a 100644
--- a/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/ResourceManager.java
+++ b/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/ResourceManager.java
@@ -234,7 +234,7 @@ public static ProjectListOption fields(ProjectField... fields) {
* @see Cloud
* Resource Manager list
- * @return {@code Page}, a page of projects.
+ * @return {@code Page}, a page of projects
* @throws ResourceManagerException upon failure
*/
Page list(ProjectListOption... options);
diff --git a/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/testing/LocalResourceManagerHelper.java b/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/testing/LocalResourceManagerHelper.java
index 8238fd0f1959..25c763276b3b 100644
--- a/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/testing/LocalResourceManagerHelper.java
+++ b/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/testing/LocalResourceManagerHelper.java
@@ -539,7 +539,7 @@ public void stop() {
/**
* Utility method to change the lifecycle state of the specified project.
*
- * @return true if the lifecycle state was successfully updated, false otherwise.
+ * @return true if the lifecycle state was successfully updated, false otherwise
*/
public synchronized boolean changeLifecycleState(String projectId, String lifecycleState) {
checkArgument(
@@ -560,7 +560,7 @@ public synchronized boolean changeLifecycleState(String projectId, String lifecy
* This method can be used to fully remove a project (to mimic when the server completely
* deletes a project).
*
- * @return true if the project was successfully deleted, false if the project didn't exist.
+ * @return true if the project was successfully deleted, false if the project didn't exist
*/
public synchronized boolean removeProject(String projectId) {
// Because this method is synchronized, any code that relies on non-atomic read/write operations
diff --git a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Storage.java b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Storage.java
index a6c04e45e6c6..85e79a8e9abf 100644
--- a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Storage.java
+++ b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Storage.java
@@ -960,7 +960,7 @@ public static class Builder {
/**
* Sets the blob to copy given bucket and blob name.
*
- * @return the builder.
+ * @return the builder
*/
public Builder source(String bucket, String blob) {
this.source = BlobId.of(bucket, blob);
@@ -970,7 +970,7 @@ public Builder source(String bucket, String blob) {
/**
* Sets the blob to copy given a {@link BlobId}.
*
- * @return the builder.
+ * @return the builder
*/
public Builder source(BlobId source) {
this.source = source;
@@ -980,7 +980,7 @@ public Builder source(BlobId source) {
/**
* Sets blob's source options.
*
- * @return the builder.
+ * @return the builder
*/
public Builder sourceOptions(BlobSourceOption... options) {
Collections.addAll(sourceOptions, options);
@@ -990,7 +990,7 @@ public Builder sourceOptions(BlobSourceOption... options) {
/**
* Sets blob's source options.
*
- * @return the builder.
+ * @return the builder
*/
public Builder sourceOptions(Iterable options) {
Iterables.addAll(sourceOptions, options);
@@ -1000,7 +1000,7 @@ public Builder sourceOptions(Iterable options) {
/**
* Sets the copy target. Target blob information is copied from source.
*
- * @return the builder.
+ * @return the builder
*/
public Builder target(BlobId target) {
this.target = BlobInfo.builder(target).build();
@@ -1012,7 +1012,7 @@ public Builder target(BlobId target) {
* source blob information (e.g. {@code contentType}, {@code contentLanguage}). {@code
* target.contentType} is a required field.
*
- * @return the builder.
+ * @return the builder
* @throws IllegalArgumentException if {@code target.contentType} is {@code null}
*/
public Builder target(BlobInfo target, BlobTargetOption... options)
@@ -1028,7 +1028,7 @@ public Builder target(BlobInfo target, BlobTargetOption... options)
* source blob information (e.g. {@code contentType}, {@code contentLanguage}). {@code
* target.contentType} is a required field.
*
- * @return the builder.
+ * @return the builder
* @throws IllegalArgumentException if {@code target.contentType} is {@code null}
*/
public Builder target(BlobInfo target, Iterable options)
@@ -1044,7 +1044,7 @@ public Builder target(BlobInfo target, Iterable options)
* if source and target blob share the same location and storage class as copy is made with
* one single RPC.
*
- * @return the builder.
+ * @return the builder
*/
public Builder megabytesCopiedPerChunk(Long megabytesCopiedPerChunk) {
this.megabytesCopiedPerChunk = megabytesCopiedPerChunk;
@@ -1114,7 +1114,7 @@ public Long megabytesCopiedPerChunk() {
* @param sourceBucket name of the bucket containing the source blob
* @param sourceBlob name of the source blob
* @param target a {@code BlobInfo} object for the target blob
- * @return a copy request.
+ * @return a copy request
* @throws IllegalArgumentException if {@code target.contentType} is {@code null}
*/
public static CopyRequest of(String sourceBucket, String sourceBlob, BlobInfo target)
@@ -1130,7 +1130,7 @@ public static CopyRequest of(String sourceBucket, String sourceBlob, BlobInfo ta
*
* @param sourceBlobId a {@code BlobId} object for the source blob
* @param target a {@code BlobInfo} object for the target blob
- * @return a copy request.
+ * @return a copy request
* @throws IllegalArgumentException if {@code target.contentType} is {@code null}
*/
public static CopyRequest of(BlobId sourceBlobId, BlobInfo target)
@@ -1145,7 +1145,7 @@ public static CopyRequest of(BlobId sourceBlobId, BlobInfo target)
* @param sourceBucket name of the bucket containing both the source and the target blob
* @param sourceBlob name of the source blob
* @param targetBlob name of the target blob
- * @return a copy request.
+ * @return a copy request
*/
public static CopyRequest of(String sourceBucket, String sourceBlob, String targetBlob) {
return CopyRequest.builder()
@@ -1160,7 +1160,7 @@ public static CopyRequest of(String sourceBucket, String sourceBlob, String targ
* @param sourceBucket name of the bucket containing the source blob
* @param sourceBlob name of the source blob
* @param target a {@code BlobId} object for the target blob
- * @return a copy request.
+ * @return a copy request
*/
public static CopyRequest of(String sourceBucket, String sourceBlob, BlobId target) {
return builder().source(sourceBucket, sourceBlob).target(target).build();
@@ -1171,7 +1171,7 @@ public static CopyRequest of(String sourceBucket, String sourceBlob, BlobId targ
*
* @param sourceBlobId a {@code BlobId} object for the source blob
* @param targetBlob name of the target blob, in the same bucket of the source blob
- * @return a copy request.
+ * @return a copy request
*/
public static CopyRequest of(BlobId sourceBlobId, String targetBlob) {
return CopyRequest.builder()
@@ -1185,7 +1185,7 @@ public static CopyRequest of(BlobId sourceBlobId, String targetBlob) {
*
* @param sourceBlobId a {@code BlobId} object for the source blob
* @param targetBlobId a {@code BlobId} object for the target blob
- * @return a copy request.
+ * @return a copy request
*/
public static CopyRequest of(BlobId sourceBlobId, BlobId targetBlobId) {
return CopyRequest.builder()
@@ -1206,7 +1206,7 @@ private static void checkContentType(BlobInfo blobInfo) throws IllegalArgumentEx
/**
* Create a new bucket.
*
- * @return a complete bucket information.
+ * @return a complete bucket information
* @throws StorageException upon failure
*/
BucketInfo create(BucketInfo bucketInfo, BucketTargetOption... options);
@@ -1214,7 +1214,7 @@ private static void checkContentType(BlobInfo blobInfo) throws IllegalArgumentEx
/**
* Create a new blob with no content.
*
- * @return a complete blob information.
+ * @return a complete blob information
* @throws StorageException upon failure
*/
BlobInfo create(BlobInfo blobInfo, BlobTargetOption... options);
@@ -1224,7 +1224,7 @@ private static void checkContentType(BlobInfo blobInfo) throws IllegalArgumentEx
* {@link #writer} is recommended as it uses resumable upload. MD5 and CRC32C hashes of
* {@code content} are computed and used for validating transferred data.
*
- * @return a complete blob information.
+ * @return a complete blob information
* @throws StorageException upon failure
* @see Hashes and ETags
*/
@@ -1236,7 +1236,7 @@ private static void checkContentType(BlobInfo blobInfo) throws IllegalArgumentEx
* values in the given {@code blobInfo} are ignored unless requested via the
* {@code BlobWriteOption.md5Match} and {@code BlobWriteOption.crc32cMatch} options.
*
- * @return a complete blob information.
+ * @return a complete blob information
* @throws StorageException upon failure
*/
BlobInfo create(BlobInfo blobInfo, InputStream content, BlobWriteOption... options);
@@ -1356,7 +1356,7 @@ private static void checkContentType(BlobInfo blobInfo) throws IllegalArgumentEx
/**
* Send a compose request.
*
- * @return the composed blob.
+ * @return the composed blob
* @throws StorageException upon failure
*/
BlobInfo compose(ComposeRequest composeRequest);
@@ -1391,7 +1391,7 @@ private static void checkContentType(BlobInfo blobInfo) throws IllegalArgumentEx
/**
* Reads all the bytes from a blob.
*
- * @return the blob's content.
+ * @return the blob's content
* @throws StorageException upon failure
*/
byte[] readAllBytes(String bucket, String blob, BlobSourceOption... options);
@@ -1399,7 +1399,7 @@ private static void checkContentType(BlobInfo blobInfo) throws IllegalArgumentEx
/**
* Reads all the bytes from a blob.
*
- * @return the blob's content.
+ * @return the blob's content
* @throws StorageException upon failure
*/
byte[] readAllBytes(BlobId blob, BlobSourceOption... options);
diff --git a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/StorageOptions.java b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/StorageOptions.java
index 9ec743c079e7..bd30cb173366 100644
--- a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/StorageOptions.java
+++ b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/StorageOptions.java
@@ -71,7 +71,7 @@ private Builder(StorageOptions options) {
* Sets the path delimiter for the storage service.
*
* @param pathDelimiter the path delimiter to set
- * @return the builder.
+ * @return the builder
*/
public Builder pathDelimiter(String pathDelimiter) {
this.pathDelimiter = pathDelimiter;
diff --git a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/testing/RemoteGcsHelper.java b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/testing/RemoteGcsHelper.java
index 77cb5661a614..73bd66520182 100644
--- a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/testing/RemoteGcsHelper.java
+++ b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/testing/RemoteGcsHelper.java
@@ -71,7 +71,7 @@ public StorageOptions options() {
* @param bucket the bucket to be deleted
* @param timeout the maximum time to wait
* @param unit the time unit of the timeout argument
- * @return true if deletion succeeded, false if timeout expired.
+ * @return true if deletion succeeded, false if timeout expired
* @throws InterruptedException if the thread deleting the bucket is interrupted while waiting
* @throws ExecutionException if an exception was thrown while deleting bucket or bucket objects
*/
@@ -100,7 +100,7 @@ public static String generateBucketName() {
*
* @param projectId id of the project to be used for running the tests
* @param keyStream input stream for a JSON key
- * @return A {@code RemoteGcsHelper} object for the provided options.
+ * @return A {@code RemoteGcsHelper} object for the provided options
* @throws com.google.gcloud.storage.testing.RemoteGcsHelper.GcsHelperException if
* {@code keyStream} is not a valid JSON key stream
*/
diff --git a/src/site/resources/index.html b/src/site/resources/index.html
index 3ed496b5bbb3..9e9c877c18df 100644
--- a/src/site/resources/index.html
+++ b/src/site/resources/index.html
@@ -122,8 +122,8 @@ What is it?
gcloud is configured to access Google Cloud Platform
services and authorize (OAuth 2.0) automatically on your behalf.
Add the gcloud dependency to your project and get a private key to be
- up and ready to go. Better yet, if you are running on a Google
- Compute Engine instance, the private key is automatically detected.
+ up and ready to go. Better yet, if you are running on Google
+ App Engine or Compute Engine, the private key is automatically detected.
@@ -143,8 +143,7 @@
Example: Retrieve Datastore Entries
// Authentication is automatic inside Google Compute Engine
// and Google App Engine.
-DatastoreOptions options = DatastoreOptions.defaultInstance();
-Datastore datastore = options.service();
+Datastore datastore = DatastoreOptions.defaultInstance().service();
KeyFactory keyFactory = datastore.newKeyFactory().kind(KIND);
Key key = keyFactory.newKey(keyName);
Entity entity = datastore.get(key);