SOLR-10907: add @SuppressWarnings("resource") in ExpandComponent

This commit is contained in:
Christine Poerschke 2017-06-26 20:15:26 +01:00
parent 0dad305193
commit 945bf8fa82
1 changed files with 2 additions and 0 deletions

View File

@ -216,6 +216,7 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
if(CollapsingQParserPlugin.HINT_TOP_FC.equals(hint)) {
Map<String, UninvertingReader.Type> mapping = new HashMap();
mapping.put(field, UninvertingReader.Type.SORTED);
@SuppressWarnings("resource")
UninvertingReader uninvertingReader = new UninvertingReader(new ReaderWrapper(searcher.getSlowAtomicReader(), field), mapping);
values = uninvertingReader.getSortedDocValues(field);
} else {
@ -386,6 +387,7 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
if(CollapsingQParserPlugin.HINT_TOP_FC.equals(hint)) {
Map<String, UninvertingReader.Type> mapping = new HashMap();
mapping.put(field, UninvertingReader.Type.SORTED);
@SuppressWarnings("resource")
UninvertingReader uninvertingReader = new UninvertingReader(new ReaderWrapper(searcher.getSlowAtomicReader(), field), mapping);
values = uninvertingReader.getSortedDocValues(field);
} else {