Revert "SOLR-10907: Fix Resource Leak warning in ExpandComponent."

This reverts commit 55b0227d8c.
This commit is contained in:
Christine Poerschke 2017-06-23 19:26:21 +01:00
parent c20d3aff94
commit 05433eb709
2 changed files with 2 additions and 9 deletions

View File

@ -199,8 +199,6 @@ Bug Fixes
thus disabling the global check, and replaces it with specific checks where desired via
QueryUtils.build(). (yonik)
* SOLR-10907: Fix Resource Leak warning in ExpandComponent. (Christine Poerschke)
Optimizations
----------------------

View File

@ -216,13 +216,8 @@ 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);
try (UninvertingReader uninvertingReader = new UninvertingReader(
new ReaderWrapper(
searcher.getSlowAtomicReader(),
field),
mapping)) {
values = uninvertingReader.getSortedDocValues(field);
}
UninvertingReader uninvertingReader = new UninvertingReader(new ReaderWrapper(searcher.getSlowAtomicReader(), field), mapping);
values = uninvertingReader.getSortedDocValues(field);
} else {
values = DocValues.getSorted(reader, field);
}