Skip to content

Commit 8920155

Browse files
authoredOct 7, 2024··
fix: make some enum fields final (#1526)
* Make some enum fields final See go/bugpattern/ImmutableEnumChecker * One more field
1 parent 08284f0 commit 8920155

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎credentials/java/com/google/auth/CredentialTypeForMetrics.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public enum CredentialTypeForMetrics {
5252
IMPERSONATED_CREDENTIALS("imp"),
5353
DO_NOT_SEND("dns");
5454

55-
private String label;
55+
private final String label;
5656

5757
private CredentialTypeForMetrics(String label) {
5858
this.label = label;

‎oauth2_http/java/com/google/auth/oauth2/IdTokenProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public enum Option {
5959
LICENSES_TRUE("licensesTrue"),
6060
INCLUDE_EMAIL("includeEmail");
6161

62-
private String option;
62+
private final String option;
6363

6464
private Option(String option) {
6565
this.option = option;

‎oauth2_http/java/com/google/auth/oauth2/MetricsUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public enum RequestType {
7878
METADATA_SERVER_PING("mds"),
7979
UNTRACKED("untracked");
8080

81-
private String label;
81+
private final String label;
8282

8383
private RequestType(String label) {
8484
this.label = label;

0 commit comments

Comments
 (0)
Please sign in to comment.