Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileStoreFileBuffersForNonExistingWorkspaceFiles.java')
-rw-r--r--org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileStoreFileBuffersForNonExistingWorkspaceFiles.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileStoreFileBuffersForNonExistingWorkspaceFiles.java b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileStoreFileBuffersForNonExistingWorkspaceFiles.java
index 235b8f55b5a..76efc9dbb13 100644
--- a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileStoreFileBuffersForNonExistingWorkspaceFiles.java
+++ b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileStoreFileBuffersForNonExistingWorkspaceFiles.java
@@ -12,6 +12,8 @@ package org.eclipse.core.filebuffers.tests;
import static org.junit.Assert.*;
+import java.io.IOException;
+
import org.junit.After;
import org.junit.Test;
@@ -66,7 +68,11 @@ public class FileStoreFileBuffersForNonExistingWorkspaceFiles extends FileStoreF
@Test
public void testBug118199_fixed() throws Exception {
- IFile file= getProject().getWorkspace().getRoot().getFileForLocation(getPath());
+ IPath location= getPath();
+ IFile file= getProject().getWorkspace().getRoot().getFileForLocation(location);
+ if (file == null) {
+ throw new IOException("File '" + location + "' can not be found."); //$NON-NLS-1$ //$NON-NLS-2$
+ }
IPath path= file.getFullPath();
assertFalse(file.exists());
fManager.connect(path, LocationKind.IFILE, null);

Back to the top