diff options
author | pavery | 2005-02-08 16:29:21 +0000 |
---|---|---|
committer | pavery | 2005-02-08 16:29:21 +0000 |
commit | 948da6726d8f5f62cac1979a16e3ab41566cb5a5 (patch) | |
tree | e752e62cfb78dfad9e7e5440b0e49430494f0d72 /bundles/org.eclipse.jst.jsp.core | |
parent | 2e4cb3004b51ca400313376128e1292e38a97141 (diff) | |
download | webtools.sourceediting-948da6726d8f5f62cac1979a16e3ab41566cb5a5.tar.gz webtools.sourceediting-948da6726d8f5f62cac1979a16e3ab41566cb5a5.tar.xz webtools.sourceediting-948da6726d8f5f62cac1979a16e3ab41566cb5a5.zip |
being safer
Diffstat (limited to 'bundles/org.eclipse.jst.jsp.core')
-rw-r--r-- | bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java index fe9adb1a4d..469c360ef2 100644 --- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java +++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java @@ -402,14 +402,16 @@ class XMLJSPRegionHelper implements StructuredDocumentRegionHandler { try { IPath filePath = new Path(fileName); IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(filePath); - if(!f.exists()) { + if(f != null && !f.exists()) { f = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(filePath); } - is = f.getContents(); - while ((c = is.read()) != -1) { - count++; - s.append((char) c); - } + if (f != null && f.exists()) { + is = f.getContents(); + while ((c = is.read()) != -1) { + count++; + s.append((char) c); + } + } } catch (Exception e) { if (Debug.debugStructuredDocument) |