Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2003-12-17 14:21:27 +0000
committerDani Megert2003-12-17 14:21:27 +0000
commitb5b09b333263b96abf0a46dc2ffca77acbb23d1b (patch)
treec9de516479c6173b430b4c519772bb34f7edd5a5 /org.eclipse.core.filebuffers
parentee669ee362a03b5a17eb6c3ec28a0950e9eb24c1 (diff)
downloadeclipse.platform.text-b5b09b333263b96abf0a46dc2ffca77acbb23d1b.tar.gz
eclipse.platform.text-b5b09b333263b96abf0a46dc2ffca77acbb23d1b.tar.xz
eclipse.platform.text-b5b09b333263b96abf0a46dc2ffca77acbb23d1b.zip
Fixed bug 48852: Found the followng exception in the log
Diffstat (limited to 'org.eclipse.core.filebuffers')
-rw-r--r--org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/JavaTextFileBuffer.java3
-rw-r--r--org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceTextFileBuffer.java7
2 files changed, 6 insertions, 4 deletions
diff --git a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/JavaTextFileBuffer.java b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/JavaTextFileBuffer.java
index 83034b0b1..d4b05920b 100644
--- a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/JavaTextFileBuffer.java
+++ b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/JavaTextFileBuffer.java
@@ -276,7 +276,8 @@ public class JavaTextFileBuffer extends JavaFileBuffer implements ITextFileBuffe
}
} catch (IOException x) {
- IStatus s= new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, x.getMessage(), x);
+ String message= (x.getMessage() != null ? x.getMessage() : ""); //$NON-NLS-1$
+ IStatus s= new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, message, x);
throw new CoreException(s);
}
}
diff --git a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceTextFileBuffer.java b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceTextFileBuffer.java
index 08a363c50..b18404c04 100644
--- a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceTextFileBuffer.java
+++ b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceTextFileBuffer.java
@@ -242,7 +242,8 @@ public class ResourceTextFileBuffer extends ResourceFileBuffer implements ITextF
}
} catch (IOException x) {
- IStatus s= new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, x.getMessage(), x);
+ String message= (x.getMessage() != null ? x.getMessage() : ""); //$NON-NLS-1$
+ IStatus s= new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, message, x);
throw new CoreException(s);
}
}
@@ -317,8 +318,8 @@ public class ResourceTextFileBuffer extends ResourceFileBuffer implements ITextF
document.set(buffer.toString());
} catch (IOException x) {
- String msg= x.getMessage() == null ? "" : x.getMessage(); //$NON-NLS-1$
- IStatus s= new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, msg, x);
+ String message= (x.getMessage() != null ? x.getMessage() : ""); //$NON-NLS-1$
+ IStatus s= new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, message, x);
throw new CoreException(s);
} finally {
if (in != null) {

Back to the top