Skip to content

Commit 77a77fd

Browse files
authored
Refactor EmbeddedJxBrowser to use SmartList (#8682)
Replaces ArrayList with SmartList for the inputs list in handleJxBrowserInstallationFailed. This list typically contains 0-2 elements, making it a good candidate for SmartList optimization.
1 parent be87f5b commit 77a77fd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/io/flutter/jxbrowser/EmbeddedJxBrowser.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import javax.swing.*;
4242
import java.awt.*;
4343
import java.io.File;
44+
import com.intellij.util.SmartList;
4445
import java.util.ArrayList;
4546
import java.util.List;
4647
import java.util.Objects;
@@ -304,7 +305,7 @@ else if (jxBrowserStatus.equals(JxBrowserStatus.INSTALLATION_FAILED)) {
304305
}
305306

306307
protected void handleJxBrowserInstallationFailed(@NotNull ContentManager contentManager) {
307-
final List<LabelInput> inputs = new ArrayList<>();
308+
final List<LabelInput> inputs = new SmartList<>();
308309

309310
final InstallationFailedReason latestFailureReason = jxBrowserManager.getLatestFailureReason();
310311

0 commit comments

Comments
 (0)