From f642a4e240ccbd375930eadc8e9781b2f3ccc215 Mon Sep 17 00:00:00 2001 From: Marco Ziccardi Date: Tue, 8 Dec 2015 20:04:32 +0100 Subject: [PATCH] Add javadoc, make checkstyle happy --- .../com/google/gcloud/bigquery/BigQueryError.java | 7 ++++--- .../java/com/google/gcloud/bigquery/CopyJobInfo.java | 2 +- .../com/google/gcloud/bigquery/ExtractJobInfo.java | 2 +- .../java/com/google/gcloud/bigquery/JobInfo.java | 4 +++- .../java/com/google/gcloud/bigquery/LoadJobInfo.java | 2 +- .../com/google/gcloud/bigquery/QueryJobInfo.java | 2 +- .../google/gcloud/bigquery/BigQueryErrorTest.java | 4 ++-- .../google/gcloud/bigquery/ExtractJobInfoTest.java | 2 -- .../com/google/gcloud/bigquery/JobStatusTest.java | 4 ++-- .../com/google/gcloud/bigquery/QueryJobInfoTest.java | 12 ++++++------ 10 files changed, 21 insertions(+), 20 deletions(-) diff --git a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BigQueryError.java b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BigQueryError.java index e0f62001013c..2d89bccf62ea 100644 --- a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BigQueryError.java +++ b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BigQueryError.java @@ -8,7 +8,8 @@ import java.util.Objects; /** - * Google Cloud BigQuery error. + * Google Cloud BigQuery Job Error. Objects of this class represent errors occurred during the + * execution of a BigQuery Job. */ public class BigQueryError implements Serializable { @@ -50,8 +51,8 @@ public ErrorProto apply(BigQueryError error) { /** * Returns short error code that summarizes the error. * - * @see - * Troubleshooting Errors + * @see Troubleshooting + * Errors */ public String reason() { return reason; diff --git a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/CopyJobInfo.java b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/CopyJobInfo.java index 36cca76eafa8..913848c8e417 100644 --- a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/CopyJobInfo.java +++ b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/CopyJobInfo.java @@ -168,7 +168,7 @@ public Builder toBuilder() { } @Override - protected MoreObjects.ToStringHelper toStringHelper() { + MoreObjects.ToStringHelper toStringHelper() { return super.toStringHelper() .add("sourceTables", sourceTables) .add("destinationTable", destinationTable) diff --git a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/ExtractJobInfo.java b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/ExtractJobInfo.java index 1ac97402f637..18957536bedd 100644 --- a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/ExtractJobInfo.java +++ b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/ExtractJobInfo.java @@ -200,7 +200,7 @@ public Builder toBuilder() { } @Override - public MoreObjects.ToStringHelper toStringHelper() { + MoreObjects.ToStringHelper toStringHelper() { return super.toStringHelper() .add("sourceTable", sourceTable) .add("destinationUris", destinationUris) 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 39753b892547..8c67b3f7722f 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 @@ -29,6 +29,8 @@ * copies an existing table. Use {@link ExtractJobInfo} for a job that exports a table to Google * Cloud Storage. Use {@link LoadJobInfo} for a job that loads data from Google Cloud Storage into * a table. Use {@link QueryJobInfo} for a job that runs a query. + * + * @see Jobs */ public abstract class JobInfo implements Serializable { @@ -226,7 +228,7 @@ public String userEmail() { */ public abstract Builder toBuilder(); - protected MoreObjects.ToStringHelper toStringHelper() { + MoreObjects.ToStringHelper toStringHelper() { return MoreObjects.toStringHelper(this) .add("jobId", jobId) .add("status", status) diff --git a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/LoadJobInfo.java b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/LoadJobInfo.java index aa52de10d12d..42e2e147df39 100644 --- a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/LoadJobInfo.java +++ b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/LoadJobInfo.java @@ -320,7 +320,7 @@ public Builder toBuilder() { } @Override - protected MoreObjects.ToStringHelper toStringHelper() { + MoreObjects.ToStringHelper toStringHelper() { return super.toStringHelper() .add("destinationTable", destinationTable) .add("sourceUris", sourceUris) diff --git a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/QueryJobInfo.java b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/QueryJobInfo.java index 53cb6df439de..4006d5ba171e 100644 --- a/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/QueryJobInfo.java +++ b/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/QueryJobInfo.java @@ -415,7 +415,7 @@ public Builder toBuilder() { } @Override - protected MoreObjects.ToStringHelper toStringHelper() { + MoreObjects.ToStringHelper toStringHelper() { return super.toStringHelper() .add("query", query) .add("destinationTable", destinationTable) diff --git a/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/BigQueryErrorTest.java b/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/BigQueryErrorTest.java index 962edb73a5cd..c8de039e233f 100644 --- a/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/BigQueryErrorTest.java +++ b/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/BigQueryErrorTest.java @@ -1,9 +1,9 @@ package com.google.gcloud.bigquery; -import org.junit.Test; - import static org.junit.Assert.assertEquals; +import org.junit.Test; + public class BigQueryErrorTest { private static final String REASON = "reason"; diff --git a/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/ExtractJobInfoTest.java b/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/ExtractJobInfoTest.java index c0e575495859..e73975c6c3ab 100644 --- a/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/ExtractJobInfoTest.java +++ b/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/ExtractJobInfoTest.java @@ -21,8 +21,6 @@ import static org.junit.Assert.assertNull; import com.google.common.collect.ImmutableList; -import com.google.gcloud.bigquery.JobInfo.CreateDisposition; -import com.google.gcloud.bigquery.JobInfo.WriteDisposition; import com.google.gcloud.bigquery.JobStatistics.ExtractStatistics; import org.junit.Test; diff --git a/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/JobStatusTest.java b/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/JobStatusTest.java index e6db41a39e12..c44386a3e72c 100644 --- a/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/JobStatusTest.java +++ b/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/JobStatusTest.java @@ -27,8 +27,8 @@ public class JobStatusTest { private static final JobStatus.State STATE = JobStatus.State.DONE; - private static final BigQueryError ERROR = new BigQueryError("reason", "location", "message", - "debugInfo"); + private static final BigQueryError ERROR = + new BigQueryError("reason", "location", "message", "debugInfo"); private static final List ALL_ERRORS = ImmutableList.of( new BigQueryError("reason1", "location1", "message1", "debugInfo1"), new BigQueryError("reason2", "location2", "message2", "debugInfo2")); diff --git a/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/QueryJobInfoTest.java b/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/QueryJobInfoTest.java index 654fce2d5f4f..f99bec19efd9 100644 --- a/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/QueryJobInfoTest.java +++ b/gcloud-java-bigquery/src/test/java/com/google/gcloud/bigquery/QueryJobInfoTest.java @@ -24,9 +24,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.gcloud.bigquery.JobInfo.CreateDisposition; +import com.google.gcloud.bigquery.JobInfo.WriteDisposition; import com.google.gcloud.bigquery.JobStatistics.QueryStatistics; import com.google.gcloud.bigquery.QueryJobInfo.Priority; -import com.google.gcloud.bigquery.JobInfo.WriteDisposition; import org.junit.Test; @@ -74,10 +74,10 @@ public class QueryJobInfoTest { private static final CreateDisposition CREATE_DISPOSITION = CreateDisposition.CREATE_IF_NEEDED; private static final WriteDisposition WRITE_DISPOSITION = WriteDisposition.WRITE_APPEND; private static final Priority PRIORITY = Priority.BATCH; - private static boolean ALLOW_LARGE_RESULTS = true; - private static boolean USE_QUERY_CACHE = false; - private static boolean FLATTEN_RESULTS = true; - private static List USER_DEFINED_FUNCTIONS = ImmutableList.of( + private static final boolean ALLOW_LARGE_RESULTS = true; + private static final boolean USE_QUERY_CACHE = false; + private static final boolean FLATTEN_RESULTS = true; + private static final List USER_DEFINED_FUNCTIONS = ImmutableList.of( UserDefinedFunction.inline("Function"), UserDefinedFunction.fromUri("URI")); private static final JobId JOB_ID = JobId.of("job"); private static final JobStatus JOB_STATUS = new JobStatus(JobStatus.State.DONE); @@ -90,7 +90,7 @@ public class QueryJobInfoTest { .cacheHit(false) .billingTier(42) .build(); - private static QueryJobInfo QUERY_JOB = QueryJobInfo.builder(QUERY) + private static final QueryJobInfo QUERY_JOB = QueryJobInfo.builder(QUERY) .etag(ETAG) .id(ID) .selfLink(SELF_LINK)