Fix ImmutableEnum lint (flutter/engine#47739)

This was introduced in https://github.com/flutter/engine/pull/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
This commit is contained in:
Jia Hao
2023-11-07 07:21:23 +00:00
committed by GitHub
parent 2086c34dbf
commit 847c0f704b

View File

@@ -75,7 +75,7 @@ public class KeyData {
kJoystick(3),
kHdmi(4);
private long value;
private final long value;
private DeviceType(long value) {
this.value = value;