diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java index 52a18a40c..58e3e5a56 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java @@ -70,7 +70,7 @@ public class ReactEditText extends EditText { private @Nullable SelectionWatcher mSelectionWatcher; private final InternalKeyListener mKeyListener; - private static KeyListener sKeyListener = QwertyKeyListener.getInstanceForFullKeyboard(); + private static final KeyListener sKeyListener = QwertyKeyListener.getInstanceForFullKeyboard(); public ReactEditText(Context context) { super(context); diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java index a9b071c72..043a36833 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java @@ -258,8 +258,8 @@ public class ReactTextInputManager extends list.add(currentFilters[i]); } } - if (list.size() > 0) { - newFilters = (InputFilter[])list.toArray(); + if (!list.isEmpty()) { + newFilters = (InputFilter[]) list.toArray(); } } } else {