Fix npe for searchable types which no longer exist because the plugin that provided the type was deleted

This commit is contained in:
Eduard Heimbuch
2022-02-18 08:18:42 +01:00
parent 1fe7b0a01e
commit a50e38077c
3 changed files with 48 additions and 0 deletions

View File

@@ -86,6 +86,9 @@ class SearchableTypeResolver {
}
public LuceneSearchableType resolve(Class<?> type) {
if (type == null) {
throw notFound(entity("type", "null"));
}
LuceneSearchableType searchableType = classToSearchableType.get(type);
if (searchableType == null) {
throw notFound(entity("type", type.getName()));