Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSopot Cela2016-11-14 22:13:08 +0000
committerAlexander Kurtakov2016-11-15 07:27:00 +0000
commitf8fb42da7c057f913096bba47222b42453d1ce3d (patch)
tree7e783d9c0fa89ea293487a4addf2a04c26d7167d
parentad603c7e425e44239148f16c15da24e13bab153b (diff)
downloadeclipse.platform.ua-f8fb42da7c057f913096bba47222b42453d1ce3d.tar.gz
eclipse.platform.ua-f8fb42da7c057f913096bba47222b42453d1ce3d.tar.xz
eclipse.platform.ua-f8fb42da7c057f913096bba47222b42453d1ce3d.zip
Bug 466829 - Upgrade platform.ua to Lucene 6.1.0Y20161117-1000I20161117-2000I20161116-2000I20161115-2000
Change back try-with-resources as it impacts the ability to read pre-built indexes. Change-Id: I8d318ceb943fed70c21499b74a22dafd8ef9a880 Signed-off-by: Sopot Cela <scela@redhat.com> Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
index 86c9eea18..3ab7e7a60 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
@@ -496,7 +496,10 @@ public class SearchIndex implements IHelpSearchIndex {
for (int i = 0; i < indexPaths.size(); i++) {
String indexId = indexIds.get(i);
String indexPath = indexPaths.get(i);
- try (NIOFSDirectory dir = new NIOFSDirectory(new File(indexPath).toPath())) {
+ try {
+ // can't use try-with-resources as 'dir' needs to stay open
+ @SuppressWarnings("resource")
+ NIOFSDirectory dir = new NIOFSDirectory(new File(indexPath).toPath());
dirList.add(dir);
} catch (IOException ioe) {
HelpBasePlugin

Back to the top