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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user