mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-21 06:04:19 +08:00
(fix)(headless) BaseMapper.getMatches,空Map提前返回matches
This commit is contained in:
@@ -129,7 +129,7 @@ public abstract class BaseMapper implements SchemaMapper {
|
|||||||
Map<MatchText, List<T>> matchResult = matchStrategy.match(chatQueryContext, terms,
|
Map<MatchText, List<T>> matchResult = matchStrategy.match(chatQueryContext, terms,
|
||||||
chatQueryContext.getRequest().getDataSetIds());
|
chatQueryContext.getRequest().getDataSetIds());
|
||||||
List<T> matches = new ArrayList<>();
|
List<T> matches = new ArrayList<>();
|
||||||
if (Objects.isNull(matchResult)) {
|
if (Objects.isNull(matchResult) || matchResult.isEmpty()) {
|
||||||
return matches;
|
return matches;
|
||||||
}
|
}
|
||||||
Optional<List<T>> first = matchResult.entrySet().stream()
|
Optional<List<T>> first = matchResult.entrySet().stream()
|
||||||
|
|||||||
Reference in New Issue
Block a user