File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
haikudepotserver-core/src/main/java/org/haiku/haikudepotserver/api1 Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 43
43
import java .util .*;
44
44
import java .util .concurrent .TimeUnit ;
45
45
import java .util .stream .Collectors ;
46
+ import java .util .stream .Stream ;
46
47
47
48
/**
48
49
* <p>See {@link PkgApi} for details on the methods this API affords.</p>
@@ -284,9 +285,13 @@ public SearchPkgsResult searchPkgs(final SearchPkgsRequest request) {
284
285
if (
285
286
null != request .expressionType
286
287
&& StringUtils .isNotBlank (request .expression )
287
- && !StringUtils .containsIgnoreCase (
288
- StringUtils .trimToEmpty (resolvedPkgVersionLocalization .getSummary ()),
289
- StringUtils .trimToEmpty (request .expression ))) {
288
+ && Stream .of (
289
+ resolvedPkgVersionLocalization .getTitle (),
290
+ resolvedPkgVersionLocalization .getSummary ())
291
+ .noneMatch (s -> StringUtils .containsIgnoreCase (
292
+ StringUtils .trimToEmpty (s ),
293
+ StringUtils .trimToEmpty (request .expression )))
294
+ ) {
290
295
resultVersion .descriptionSnippet = StringHelper .tryCreateTextSnippetAroundFoundText (
291
296
resolvedPkgVersionLocalization .getDescription (),
292
297
request .expression ,
You can’t perform that action at this time.
0 commit comments