Skip to content

Commit

Permalink
🦉 Updates from OwlBot post-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] committed Sep 12, 2023
1 parent 4ddad12 commit c41f542
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
20 changes: 10 additions & 10 deletions oauth2_http/java/com/google/auth/oauth2/GoogleCredentials.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,9 @@ public static GoogleCredentials fromStream(
/**
* Returns an instance of GoogleCredentials defined by JSON
*
* To be used to parse common credentials fields
* <p>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.
*/
Expand All @@ -233,7 +232,7 @@ static GoogleCredentials fromJson(Map<String, Object> 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) {
Expand All @@ -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()) {
Expand Down Expand Up @@ -298,7 +297,7 @@ protected GoogleCredentials() {
/**
* Constructor with explicit access token and quotaProjectId
*
* Deprecated, please use the builder constructor whenever possible
* <p>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
Expand All @@ -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
*/
Expand All @@ -334,7 +332,7 @@ protected GoogleCredentials(Builder builder) {
/**
* Constructor with explicit access token and refresh times
*
* Deprecated, please use the builder constructor whenever possible
* <p>Deprecated, please use the builder constructor whenever possible
*
* @param accessToken initial or temporary access token
*/
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c41f542

Please sign in to comment.