mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-128824 - NPE: PluginManagerConfigurableNew$$.customizeCellRenderer
This commit is contained in:
+1
-1
@@ -919,7 +919,7 @@ public class PluginManagerConfigurableNew
|
||||
protected void customizeCellRenderer(@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) {
|
||||
IdeaPluginDescriptor descriptor = (IdeaPluginDescriptor)value;
|
||||
|
||||
String splitter = (String)myPopup.data;
|
||||
String splitter = myPopup == null ? null : (String)myPopup.data;
|
||||
for (String partName : SearchQueryParser.split(descriptor.getName(), splitter)) {
|
||||
append(partName, partName.equalsIgnoreCase(splitter)
|
||||
? SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES
|
||||
|
||||
@@ -4,6 +4,7 @@ package com.intellij.ide.plugins.newui;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.util.io.URLUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
@@ -17,9 +18,14 @@ public abstract class SearchQueryParser {
|
||||
public String searchQuery;
|
||||
|
||||
@NotNull
|
||||
public static List<String> split(@NotNull String name, @NotNull String query) {
|
||||
public static List<String> split(@NotNull String name, @Nullable String query) {
|
||||
List<String> result = new ArrayList<>();
|
||||
|
||||
if (query == null) {
|
||||
result.add(name);
|
||||
return result;
|
||||
}
|
||||
|
||||
int length = name.length();
|
||||
int queryLength = query.length();
|
||||
int index = 0;
|
||||
|
||||
Reference in New Issue
Block a user