Commit 6757e54
Mark private static fields as final in ReactHorizontalScrollView (facebook#54343)
Summary:
Pull Request resolved: facebook#54343
Fixed NotWrittenPrivateField lint warnings in ReactHorizontalScrollView.java by marking three private static fields as final:
- DEBUG_MODE: Changed from `private static boolean` to `private static final boolean`
- TAG: Changed from `private static String` to `private static final String`
- NO_SCROLL_POSITION: Changed from `private static int` to `private static final int`
These fields are initialized once and never modified, making them compile-time constants. Marking them as final follows Java best practices and prevents potential issues with Redex code optimization.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D85904890
fbshipit-source-id: f83a19392a2418d8415936421f1e0213166430561 parent 3ff4ab2 commit 6757e54
File tree
1 file changed
+3
-3
lines changed- packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll
1 file changed
+3
-3
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
| 86 | + | |
| 87 | + | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
0 commit comments