Skip to content

Commit

Permalink
fix: make some enum fields final (#1526)
Browse files Browse the repository at this point in the history
* Make some enum fields final

See go/bugpattern/ImmutableEnumChecker

* One more field
  • Loading branch information
cushon authored Oct 7, 2024
1 parent 08284f0 commit 8920155
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public enum CredentialTypeForMetrics {
IMPERSONATED_CREDENTIALS("imp"),
DO_NOT_SEND("dns");

private String label;
private final String label;

private CredentialTypeForMetrics(String label) {
this.label = label;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public enum Option {
LICENSES_TRUE("licensesTrue"),
INCLUDE_EMAIL("includeEmail");

private String option;
private final String option;

private Option(String option) {
this.option = option;
Expand Down
2 changes: 1 addition & 1 deletion oauth2_http/java/com/google/auth/oauth2/MetricsUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public enum RequestType {
METADATA_SERVER_PING("mds"),
UNTRACKED("untracked");

private String label;
private final String label;

private RequestType(String label) {
this.label = label;
Expand Down

0 comments on commit 8920155

Please sign in to comment.