Filter null suggestions for tab completion (avoid potential NPE)
This commit is contained in:
parent
0a88c2d55f
commit
ac78be7efc
@ -29,7 +29,7 @@ public interface SuggestionsSupplier<S> {
|
||||
|
||||
|
||||
public static Predicate<String> filter(String token) {
|
||||
return suggestion -> suggestion.toLowerCase().startsWith(token.toLowerCase());
|
||||
return suggestion -> suggestion != null && suggestion.toLowerCase().startsWith(token.toLowerCase());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user