Skip to content

Commit 3822c88

Browse files
authored
Use pattern matching for instanceof in afterTextChanged (#567)
1 parent 5695408 commit 3822c88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

android/src/main/java/com/expensify/livemarkdown/MarkdownTextWatcher.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public void onTextChanged(CharSequence s, int start, int before, int count) {
2525

2626
@Override
2727
public void afterTextChanged(Editable editable) {
28-
if (editable instanceof SpannableStringBuilder) {
29-
mMarkdownUtils.applyMarkdownFormatting((SpannableStringBuilder) editable);
28+
if (editable instanceof SpannableStringBuilder ssb) {
29+
mMarkdownUtils.applyMarkdownFormatting(ssb);
3030
}
3131
}
3232
}

0 commit comments

Comments
 (0)