Skip to content

Commit 205031e

Browse files
committed
chore: Fix comments
1 parent d7c9c68 commit 205031e

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

oauth2_http/java/com/google/auth/oauth2/ComputeEngineCredentials.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ private String getUniverseDomainFromMetadata() throws IOException {
345345
/** Refresh the access token by getting it from the GCE metadata server */
346346
@Override
347347
public AccessToken refreshAccessToken() throws IOException {
348-
// Retrieve the default service account email if MDS wasn't available during the constructor
348+
// Retrieve the default service account email prior to retrieving the access token
349349
if (serviceAccountEmail == null) {
350350
serviceAccountEmail = getDefaultServiceAccount();
351351
principal = serviceAccountEmail;

oauth2_http/java/com/google/auth/oauth2/GoogleCredentials.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class GoogleCredentials extends OAuth2Credentials implements QuotaProject
6262

6363
static final String QUOTA_PROJECT_ID_HEADER_KEY = "x-goog-user-project";
6464

65-
/** Enum info mapping for GoogleCredential subclasses */
65+
/** Internal Enum info mapping for GoogleCredential subclasses */
6666
enum GoogleCredentialsInfo {
6767
USER_CREDENTIALS("User Credentials", "authorized_user"),
6868
SERVICE_ACCOUNT_CREDENTIALS("Service Account Credentials", "service_account"),
@@ -83,21 +83,21 @@ enum GoogleCredentialsInfo {
8383
this.fileType = fileType;
8484
}
8585

86-
public String getCredentialName() {
86+
String getCredentialName() {
8787
return credentialName;
8888
}
8989

90-
public String getFileType() {
90+
String getFileType() {
9191
return fileType;
9292
}
9393
}
9494

95-
/* The following package-private fields provide additional info for errors message */
95+
/* The following package-private fields to provide additional info for errors message */
9696
// Source of the credential (e.g. env var value or well know file location)
9797
String source;
98-
// User-friendly name of actual Credential class
98+
// User-friendly name of the Credential class
9999
String name;
100-
// Identity of the credential (not all credentials will have this)
100+
// Identity of the credential
101101
String principal;
102102

103103
private final String universeDomain;
@@ -537,8 +537,8 @@ public GoogleCredentials createDelegated(String user) {
537537
}
538538

539539
/**
540-
* Internal method meant to help provide information for how certain Credential objects loaded by
541-
* ADC were initialized
540+
* Internal method meant to help provide information for how certain Credential objects were
541+
* initialized by ADC (e.g. The well-known file location or env var)
542542
*/
543543
GoogleCredentials withSource(String source) {
544544
return toBuilder().setSource(source).build();
@@ -554,7 +554,7 @@ GoogleCredentials withSource(String source) {
554554
* <li>principal - Identity used for the credential
555555
* </ul>
556556
*
557-
* These fields are populated on a best-effort basis and may be populated missing
557+
* Missing fields values are not included in the mapping
558558
*
559559
* @return Map of information regarding how the Credential was initialized
560560
*/

0 commit comments

Comments
 (0)