Skip to content

Commit

Permalink
Add javadoc, make checkstyle happy
Browse files Browse the repository at this point in the history
  • Loading branch information
mziccard committed Dec 8, 2015
1 parent c2703c9 commit f642a4e
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -50,8 +51,8 @@ public ErrorProto apply(BigQueryError error) {
/**
* Returns short error code that summarizes the error.
*
* @see <a href="https://cloud.google.com/bigquery/troubleshooting-errors">
* Troubleshooting Errors</a>
* @see <a href="https://cloud.google.com/bigquery/troubleshooting-errors">Troubleshooting
* Errors</a>
*/
public String reason() {
return reason;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public Builder toBuilder() {
}

@Override
protected MoreObjects.ToStringHelper toStringHelper() {
MoreObjects.ToStringHelper toStringHelper() {
return super.toStringHelper()
.add("sourceTables", sourceTables)
.add("destinationTable", destinationTable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public Builder toBuilder() {
}

@Override
public MoreObjects.ToStringHelper toStringHelper() {
MoreObjects.ToStringHelper toStringHelper() {
return super.toStringHelper()
.add("sourceTable", sourceTable)
.add("destinationUris", destinationUris)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://cloud.google.com/bigquery/docs/reference/v2/jobs">Jobs</a>
*/
public abstract class JobInfo<S extends JobStatistics> implements Serializable {

Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public Builder toBuilder() {
}

@Override
protected MoreObjects.ToStringHelper toStringHelper() {
MoreObjects.ToStringHelper toStringHelper() {
return super.toStringHelper()
.add("destinationTable", destinationTable)
.add("sourceUris", sourceUris)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public Builder toBuilder() {
}

@Override
protected MoreObjects.ToStringHelper toStringHelper() {
MoreObjects.ToStringHelper toStringHelper() {
return super.toStringHelper()
.add("query", query)
.add("destinationTable", destinationTable)
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<BigQueryError> ALL_ERRORS = ImmutableList.of(
new BigQueryError("reason1", "location1", "message1", "debugInfo1"),
new BigQueryError("reason2", "location2", "message2", "debugInfo2"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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<UserDefinedFunction> 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<UserDefinedFunction> 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);
Expand All @@ -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)
Expand Down

0 comments on commit f642a4e

Please sign in to comment.