Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix checkstyle issues in gcloud-java-core #871

Merged
merged 2 commits into from
Apr 7, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public String apply(FieldSelector fieldSelector) {
};

private static String selector(List<? extends FieldSelector> required, FieldSelector[] others,
String... extraResourceFields) {
String... extraResourceFields) {
Set<String> fieldStrings = Sets.newHashSetWithExpectedSize(required.size() + others.length);
fieldStrings.addAll(Lists.transform(required, FIELD_TO_STRING_FUNCTION));
fieldStrings.addAll(Lists.transform(Arrays.asList(others), FIELD_TO_STRING_FUNCTION));
Expand Down
7 changes: 3 additions & 4 deletions gcloud-java-core/src/main/java/com/google/gcloud/Page.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,16 @@
/**
* Interface for Google Cloud paginated results.
*
* <p>
* Use {@code Page} to iterate through all values (also in next pages):
* <p>Use {@code Page} to iterate through all values (also in next pages):
* <pre> {@code
* Page<T> page = ...; // get a Page<T> instance
* Iterator<T> iterator = page.iterateAll();
* while (iterator.hasNext()) {
* T value = iterator.next();
* // do something with value
* }}</pre>
* <p>
* Or handle pagination explicitly:
*
* <p>Or handle pagination explicitly:
* <pre> {@code
* Page<T> page = ...; // get a Page<T> instance
* while (page != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@
/**
* Implementation of this interface can persist their state and restore from it.
*
* <p>
* A typical capture usage:
* <p>A typical capture usage:
* <pre> {@code
* X restorableObj; // X instanceof Restorable<X>
* RestorableState<X> state = restorableObj.capture();
* .. persist state
* }</pre>
*
* A typical restore usage:
* <p>A typical restore usage:
* <pre> {@code
* RestorableState<X> state = ... // read from persistence
* X restorableObj = state.restore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* A common interface for restorable states. Implementations of {@code RestorableState} are capable
* of saving the state of an object to restore it for later use.
*
* Implementations of this class must implement {@link java.io.Serializable} to ensure that the
* <p>Implementations of this class must implement {@link java.io.Serializable} to ensure that the
* state of a the object can be correctly serialized.
*
* @param <T> the restored object's type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ public abstract class ServiceOptions<ServiceT extends Service<OptionsT>, Service
/**
* A base interface for all {@link HttpTransport} factories.
*
* Implementation must provide a public no-arg constructor. Loading of a factory implementation is
* done via {@link java.util.ServiceLoader}.
* <p>Implementation must provide a public no-arg constructor. Loading of a factory implementation
* is done via {@link java.util.ServiceLoader}.
*/
public interface HttpTransportFactory {
HttpTransport create();
Expand Down Expand Up @@ -129,7 +129,7 @@ public HttpTransport create() {
* A class providing access to the current time in milliseconds. This class is mainly used for
* testing and will be replaced by Java8's {@code java.time.Clock}.
*
* Implementations should implement {@code Serializable} wherever possible and must document
* <p>Implementations should implement {@code Serializable} wherever possible and must document
* whether or not they do support serialization.
*/
public abstract static class Clock {
Expand Down Expand Up @@ -490,7 +490,7 @@ protected static String appEngineProjectId() {
protected static String serviceAccountProjectId() {
String project = null;
String credentialsPath = System.getenv("GOOGLE_APPLICATION_CREDENTIALS");
if(credentialsPath != null) {
if (credentialsPath != null) {
try (InputStream credentialsStream = new FileInputStream(credentialsPath)) {
JSONObject json = new JSONObject(new JSONTokener(credentialsStream));
project = json.getString("project_id");
Expand Down Expand Up @@ -518,9 +518,8 @@ public ServiceRpcT rpc() {
}

/**
* Returns the project id.
*
* Return value can be null (for services that don't require a project id).
* Returns the project id. Return value can be null (for services that don't require a project
* id).
*/
public String projectId() {
return projectId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
import com.google.gcloud.ServiceOptions;

/**
* A base interface for all service RPC factories.
*
* Implementation must provide a public no-arg constructor.
* Loading of a factory implementation is done via {@link java.util.ServiceLoader}.
* A base interface for all service RPC factories. Implementation must provide a public no-arg

This comment was marked as spam.

This comment was marked as spam.

* constructor. Loading of a factory implementation is done via {@link java.util.ServiceLoader}.
*/
@SuppressWarnings("rawtypes")
public interface ServiceRpcFactory<ServiceRpcT, OptionsT extends ServiceOptions> {
Expand Down