diff --git a/oauth2_http/java/com/google/auth/oauth2/GoogleCredentials.java b/oauth2_http/java/com/google/auth/oauth2/GoogleCredentials.java index b59e7fbbd..a0505ac4d 100644 --- a/oauth2_http/java/com/google/auth/oauth2/GoogleCredentials.java +++ b/oauth2_http/java/com/google/auth/oauth2/GoogleCredentials.java @@ -207,10 +207,9 @@ public static GoogleCredentials fromStream( /** * Returns an instance of GoogleCredentials defined by JSON * - * To be used to parse common credentials fields + *

To be used to parse common credentials fields * * @param json a map from the JSON representing the credentials. - * * @return the credentials defined by the JSON. * @throws IOException if the credential cannot be created from the JSON. */ @@ -233,7 +232,7 @@ static GoogleCredentials fromJson(Map json) throws IOException { * Creates a credential with the provided universe domain. * * @param universeDomain the universe domain to set on the credential. Empty or null value will - * result in the default universe domain 'googleapis.com' + * result in the default universe domain 'googleapis.com' * @return credential with the provided universe domain */ public GoogleCredentials createWithUniverseDomain(String universeDomain) { @@ -253,8 +252,8 @@ public GoogleCredentials createWithQuotaProject(String quotaProject) { /** * Returns the universe domain for the credential * - * @return An explicit universe domain if it was explicitly provided, - * {@code GoogleAuthUtils.GOOGLE_DEFAULT_UNIVERSE} otherwise. + * @return An explicit universe domain if it was explicitly provided, {@code + * GoogleAuthUtils.GOOGLE_DEFAULT_UNIVERSE} otherwise. */ public String getUniverseDomain() { if (this.universeDomain == null || universeDomain.trim().isEmpty()) { @@ -298,7 +297,7 @@ protected GoogleCredentials() { /** * Constructor with explicit access token and quotaProjectId * - * Deprecated, please use the builder constructor whenever possible + *

Deprecated, please use the builder constructor whenever possible * * @param accessToken initial or temporary access token * @param quotaProjectId a quotaProjectId, a project id to be used for billing purposes @@ -320,8 +319,7 @@ public GoogleCredentials(AccessToken accessToken) { } /** - * Constructor with using builder - * All the fields comes explicitly from builder + * Constructor with using builder All the fields comes explicitly from builder * * @param builder an instance of a builder */ @@ -334,7 +332,7 @@ protected GoogleCredentials(Builder builder) { /** * Constructor with explicit access token and refresh times * - * Deprecated, please use the builder constructor whenever possible + *

Deprecated, please use the builder constructor whenever possible * * @param accessToken initial or temporary access token */ @@ -462,7 +460,9 @@ public String getQuotaProjectId() { return this.quotaProjectId; } - public String getUniverseDomain() { return this.universeDomain; } + public String getUniverseDomain() { + return this.universeDomain; + } @Override public Builder setAccessToken(AccessToken token) { diff --git a/oauth2_http/java/com/google/auth/oauth2/ServiceAccountCredentials.java b/oauth2_http/java/com/google/auth/oauth2/ServiceAccountCredentials.java index 728caa93a..effc8a67a 100644 --- a/oauth2_http/java/com/google/auth/oauth2/ServiceAccountCredentials.java +++ b/oauth2_http/java/com/google/auth/oauth2/ServiceAccountCredentials.java @@ -41,7 +41,6 @@ import com.google.api.client.http.HttpResponse; import com.google.api.client.http.HttpResponseException; import com.google.api.client.http.UrlEncodedContent; -import com.google.api.client.json.GenericJson; import com.google.api.client.json.JsonFactory; import com.google.api.client.json.JsonObjectParser; import com.google.api.client.json.webtoken.JsonWebSignature; @@ -61,7 +60,6 @@ import java.io.ObjectInputStream; import java.net.URI; import java.net.URISyntaxException; -import java.nio.charset.StandardCharsets; import java.security.GeneralSecurityException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; @@ -465,7 +463,8 @@ public static ServiceAccountCredentials fromStream(InputStream credentialsStream public static ServiceAccountCredentials fromStream( InputStream credentialsStream, HttpTransportFactory transportFactory) throws IOException { ServiceAccountCredentials credential = - (ServiceAccountCredentials) GoogleCredentials.fromStream(credentialsStream, transportFactory); + (ServiceAccountCredentials) + GoogleCredentials.fromStream(credentialsStream, transportFactory); if (credential == null) { throw new IOException( String.format( @@ -721,8 +720,7 @@ public byte[] sign(byte[] toSign) { /** * Returns a new JwtCredentials instance with modified claims. * - * @param newClaims new claims. Any unspecified claim fields will default to the current - * values. + * @param newClaims new claims. Any unspecified claim fields will default to the current values. * @return new credentials */ @Override