Skip to content

Commit

Permalink
Fix ImmutableEnum lint (#47739)
Browse files Browse the repository at this point in the history
This was introduced in #47315. Internally, this lint breaks the build with the following error:

```
shell/platform/android/io/flutter/embedding/android/KeyData.java:78: Error: DeviceType is an enum, which should be immutable, but field DeviceType.value is not final [ImmutableEnum]
    private long value;
    ~~~~~~~~~~~~~~~~~~~
```

See also https://errorprone.info/bugpattern/ImmutableEnumChecker.

Fixes: b/309552840

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
  • Loading branch information
jiahaog committed Nov 7, 2023
1 parent 7f4d56a commit 99149d5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public enum DeviceType {
kJoystick(3),
kHdmi(4);

private long value;
private final long value;

private DeviceType(long value) {
this.value = value;
Expand Down

0 comments on commit 99149d5

Please sign in to comment.