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 thus disabling the global check, and replaces it with specific checks where desired via
QueryUtils.build(). (yonik) QueryUtils.build(). (yonik)
* SOLR-10907: Fix Resource Leak warning in ExpandComponent. (Christine Poerschke)
Optimizations Optimizations
---------------------- ----------------------

View File

@ -216,13 +216,8 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
if(CollapsingQParserPlugin.HINT_TOP_FC.equals(hint)) { if(CollapsingQParserPlugin.HINT_TOP_FC.equals(hint)) {
Map<String, UninvertingReader.Type> mapping = new HashMap(); Map<String, UninvertingReader.Type> mapping = new HashMap();
mapping.put(field, UninvertingReader.Type.SORTED); mapping.put(field, UninvertingReader.Type.SORTED);
try (UninvertingReader uninvertingReader = new UninvertingReader( UninvertingReader uninvertingReader = new UninvertingReader(new ReaderWrapper(searcher.getSlowAtomicReader(), field), mapping);
new ReaderWrapper( values = uninvertingReader.getSortedDocValues(field);
searcher.getSlowAtomicReader(),
field),
mapping)) {
values = uninvertingReader.getSortedDocValues(field);
}
} else { } else {
values = DocValues.getSorted(reader, field); values = DocValues.getSorted(reader, field);
} }