Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2015-07-31 14:59:56 +0000
committerDani Megert2015-07-31 14:59:56 +0000
commit0236d3306946294401bf0d025b1ee4ec2ad28cb6 (patch)
tree892e3a079e01709e6a67cedfd48b8d035af938b7 /org.eclipse.search/search/org/eclipse/search/internal
parentd9f1c007c1fb7eb2f60917f7f26f78a1e5361566 (diff)
downloadeclipse.platform.text-0236d3306946294401bf0d025b1ee4ec2ad28cb6.tar.gz
eclipse.platform.text-0236d3306946294401bf0d025b1ee4ec2ad28cb6.tar.xz
eclipse.platform.text-0236d3306946294401bf0d025b1ee4ec2ad28cb6.zip
Fixed bug 465070: TextSearchVisitor.processFile method relies on undocumented behavior of IFile.getContents()
Diffstat (limited to 'org.eclipse.search/search/org/eclipse/search/internal')
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java b/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java
index 1747e4c4df3..179fd7a4474 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/core/text/TextSearchVisitor.java
@@ -36,7 +36,6 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.JobGroup;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceStatus;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -408,15 +407,8 @@ public class TextSearchVisitor {
String message= Messages.format(SearchMessages.TextSearchVisitor_error, args);
return new Status(IStatus.ERROR, NewSearchUI.PLUGIN_ID, IStatus.ERROR, message, e);
} catch (CoreException e) {
- if (fIsLightweightAutoRefresh && IResourceStatus.FAILED_READ_LOCAL == e.getStatus().getCode()) {
- // Check if read failed because the file no longer exists
- try {
- file.refreshLocal(IResource.DEPTH_ZERO, monitor);
- if (!file.exists())
- return monitor.isCanceled() ? Status.CANCEL_STATUS : Status.OK_STATUS;
- } catch (CoreException ex) {
- // Report original CoreException
- }
+ if (fIsLightweightAutoRefresh && IResourceStatus.RESOURCE_NOT_FOUND == e.getStatus().getCode()) {
+ return monitor.isCanceled() ? Status.CANCEL_STATUS : Status.OK_STATUS;
}
String[] args= { getExceptionMessage(e), file.getFullPath().makeRelative().toString() };
String message= Messages.format(SearchMessages.TextSearchVisitor_error, args);

Back to the top