diff options
author | Sopot Cela | 2016-11-14 22:13:08 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2016-11-15 07:27:00 +0000 |
commit | f8fb42da7c057f913096bba47222b42453d1ce3d (patch) | |
tree | 7e783d9c0fa89ea293487a4addf2a04c26d7167d /org.eclipse.help.base | |
parent | ad603c7e425e44239148f16c15da24e13bab153b (diff) | |
download | eclipse.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>
Diffstat (limited to 'org.eclipse.help.base')
-rw-r--r-- | org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java | 5 |
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 |