diff --git a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/DatasetInfo.java b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/DatasetInfo.java
index dad5f715ee5f..aa767b97631b 100644
--- a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/DatasetInfo.java
+++ b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/DatasetInfo.java
@@ -396,7 +396,8 @@ public int hashCode() {
@Override
public boolean equals(Object obj) {
- return obj.getClass().equals(DatasetInfo.class)
+ return obj != null
+ && obj.getClass().equals(DatasetInfo.class)
&& Objects.equals(toPb(), ((DatasetInfo) obj).toPb());
}
diff --git a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/ExternalTableDefinition.java b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/ExternalTableDefinition.java
index 882b1eb7065f..5f396d948f5a 100644
--- a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/ExternalTableDefinition.java
+++ b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/ExternalTableDefinition.java
@@ -28,8 +28,8 @@
import java.util.Objects;
/**
- * Google BigQuery external table type. BigQuery's external tables are tables whose data reside
- * outside of BigQuery but can be queried as normal BigQuery tables. External tables are
+ * Google BigQuery external table definition. BigQuery's external tables are tables whose data
+ * reside outside of BigQuery but can be queried as normal BigQuery tables. External tables are
* experimental and might be subject to change or removed.
*
* @see Federated Data Sources
diff --git a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/JobInfo.java b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/JobInfo.java
index 2f27895e216b..1adf7fabafc1 100644
--- a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/JobInfo.java
+++ b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/JobInfo.java
@@ -319,7 +319,9 @@ public int hashCode() {
@Override
public boolean equals(Object obj) {
- return obj.getClass().equals(JobInfo.class) && Objects.equals(toPb(), ((JobInfo) obj).toPb());
+ return obj != null
+ && obj.getClass().equals(JobInfo.class)
+ && Objects.equals(toPb(), ((JobInfo) obj).toPb());
}
JobInfo setProjectId(String projectId) {
diff --git a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/StandardTableDefinition.java b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/StandardTableDefinition.java
index d6e8f0176609..d0e49157a99c 100644
--- a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/StandardTableDefinition.java
+++ b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/StandardTableDefinition.java
@@ -26,10 +26,11 @@
import java.util.Objects;
/**
- * A Google BigQuery default table type. This type is used for standard, two-dimensional tables with
- * individual records organized in rows, and a data type assigned to each column (also called a
- * field). Individual fields within a record may contain nested and repeated children fields. Every
- * table is described by a schema that describes field names, types, and other information.
+ * A Google BigQuery default table definition. This definition is used for standard, two-dimensional
+ * tables with individual records organized in rows, and a data type assigned to each column (also
+ * called a field). Individual fields within a record may contain nested and repeated children
+ * fields. Every table is described by a schema that describes field names, types, and other
+ * information.
*
* @see Managing Tables
*/
@@ -218,14 +219,14 @@ public StreamingBuffer streamingBuffer() {
}
/**
- * Returns a builder for a BigQuery default table type.
+ * Returns a builder for a BigQuery standard table definition.
*/
public static Builder builder() {
return new Builder();
}
/**
- * Creates a BigQuery default table type given its schema.
+ * Creates a BigQuery standard table definition given its schema.
*
* @param schema the schema of the table
*/
diff --git a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/Table.java b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/Table.java
index de32baa82dab..3f902d2ff242 100644
--- a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/Table.java
+++ b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/Table.java
@@ -213,7 +213,8 @@ public InsertAllResponse insert(Iterable rows,
* @param options table data list options
* @throws BigQueryException upon failure
*/
- public Page> list(BigQuery.TableDataListOption... options) throws BigQueryException {
+ public Page> list(BigQuery.TableDataListOption... options)
+ throws BigQueryException {
return bigquery.listTableData(tableId(), options);
}
diff --git a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/TableDefinition.java b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/TableDefinition.java
index de858f54ac43..26e7bcc76f55 100644
--- a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/TableDefinition.java
+++ b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/TableDefinition.java
@@ -25,7 +25,7 @@
import java.util.Objects;
/**
- * Base class for a Google BigQuery table type.
+ * Base class for a Google BigQuery table definition.
*/
public abstract class TableDefinition implements Serializable {
@@ -63,10 +63,10 @@ public enum Type {
}
/**
- * Base builder for table types.
+ * Base builder for table definitions.
*
- * @param the table type class
- * @param the table type builder
+ * @param the table definition class
+ * @param the table definition builder
*/
public abstract static class Builder> {
@@ -152,8 +152,8 @@ final int baseHashCode() {
return Objects.hash(type);
}
- final boolean baseEquals(TableDefinition jobConfiguration) {
- return Objects.equals(toPb(), jobConfiguration.toPb());
+ final boolean baseEquals(TableDefinition tableDefinition) {
+ return Objects.equals(toPb(), tableDefinition.toPb());
}
Table toPb() {
diff --git a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/TableInfo.java b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/TableInfo.java
index 64bcf8db7f83..de331350e978 100644
--- a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/TableInfo.java
+++ b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/TableInfo.java
@@ -339,7 +339,8 @@ public int hashCode() {
@Override
public boolean equals(Object obj) {
- return obj.getClass().equals(TableInfo.class)
+ return obj != null
+ && obj.getClass().equals(TableInfo.class)
&& Objects.equals(toPb(), ((TableInfo) obj).toPb());
}
diff --git a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/ViewDefinition.java b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/ViewDefinition.java
index 7065bcc155d2..796dd411b4a1 100644
--- a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/ViewDefinition.java
+++ b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/ViewDefinition.java
@@ -27,8 +27,9 @@
import java.util.Objects;
/**
- * Google BigQuery view table type. BigQuery's views are logical views, not materialized views,
- * which means that the query that defines the view is re-executed every time the view is queried.
+ * Google BigQuery view table definition. BigQuery's views are logical views, not materialized
+ * views, which means that the query that defines the view is re-executed every time the view is
+ * queried.
*
* @see Views
*/
@@ -168,7 +169,7 @@ Table toPb() {
}
/**
- * Returns a builder for a BigQuery view type.
+ * Returns a builder for a BigQuery view definition.
*
* @param query the query used to generate the view
*/
@@ -177,7 +178,7 @@ public static Builder builder(String query) {
}
/**
- * Returns a builder for a BigQuery view type.
+ * Returns a builder for a BigQuery view definition.
*
* @param query the query used to generate the table
* @param functions user-defined functions that can be used by the query
@@ -187,7 +188,7 @@ public static Builder builder(String query, List functions)
}
/**
- * Returns a builder for a BigQuery view type.
+ * Returns a builder for a BigQuery view definition.
*
* @param query the query used to generate the table
* @param functions user-defined functions that can be used by the query
@@ -197,7 +198,7 @@ public static Builder builder(String query, UserDefinedFunction... functions) {
}
/**
- * Creates a BigQuery view type given the query used to generate the table.
+ * Creates a BigQuery view definition given the query used to generate the table.
*
* @param query the query used to generate the table
*/
@@ -206,7 +207,7 @@ public static ViewDefinition of(String query) {
}
/**
- * Creates a BigQuery view type given a query and some user-defined functions.
+ * Creates a BigQuery view definition given a query and some user-defined functions.
*
* @param query the query used to generate the table
* @param functions user-defined functions that can be used by the query
@@ -216,7 +217,7 @@ public static ViewDefinition of(String query, List function
}
/**
- * Creates a BigQuery view type given a query and some user-defined functions.
+ * Creates a BigQuery view definition given a query and some user-defined functions.
*
* @param query the query used to generate the table
* @param functions user-defined functions that can be used by the query