You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GravitinoErrorCode.java:39: warning: [ImmutableEnumChecker] enums should be immutable: 'GravitinoErrorCode' has field 'errorCode' of type 'io.trino.spi.ErrorCode', the declaration of type 'io.trino.spi.ErrorCode' is not annotated with @com.google.errorprone.annotations.Immutable
private final ErrorCode errorCode;
### What changes were proposed in this pull request?
ImmutableEnumChecker will check whether a Eunm is immutable.
Such cases will be recognized as an immutable object:
- All fields are final.
- The types of all fields of the enum are deeply immutable.
- The class annotated by `@com.google.errorprone.annotations.Immutable`.
See more details at
https://errorprone.info/bugpattern/ImmutableEnumChecker.
In this MR, we suppress ImmutableEnumChecker on
`io.trino.spi.ErrorCode`, because it is outside the project.
### Why are the changes needed?
- Fix: #2162
### Does this PR introduce _any_ user-facing change?
- no
### How was this patch tested?
- `./gradlew build`
What would you like to be improved?
GravitinoErrorCode.java:39: warning: [ImmutableEnumChecker] enums should be immutable: 'GravitinoErrorCode' has field 'errorCode' of type 'io.trino.spi.ErrorCode', the declaration of type 'io.trino.spi.ErrorCode' is not annotated with @com.google.errorprone.annotations.Immutable
private final ErrorCode errorCode;
See https://errorprone.info/bugpattern/ImmutableEnumChecker
How should we improve?
No response
The text was updated successfully, but these errors were encountered: