summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2007-07-11 15:29:09 (EDT)
committer pelder2007-07-11 15:29:09 (EDT)
commit9ece6d95230c3d1f52b799a4e9706f5eb42d3fa6 (patch)
treefc04aa9f3ed44a2fb3c3d9f9a424377c819b550c
parent49364f8b6aa750497cf2f0733982d40154749e1c (diff)
downloadorg.eclipse.jet-9ece6d95230c3d1f52b799a4e9706f5eb42d3fa6.zip
org.eclipse.jet-9ece6d95230c3d1f52b799a4e9706f5eb42d3fa6.tar.gz
org.eclipse.jet-9ece6d95230c3d1f52b799a4e9706f5eb42d3fa6.tar.bz2
[196077] Null values passed to BodyContentWriter.write(String) causes many BadLocationExceptions
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/BodyContentWriter.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/BodyContentWriter.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/BodyContentWriter.java
index 21a9f86..889593c 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/BodyContentWriter.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/BodyContentWriter.java
@@ -27,7 +27,6 @@ import org.eclipse.jface.text.AbstractDocument;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.BadPositionCategoryException;
import org.eclipse.jface.text.DefaultLineTracker;
-import org.eclipse.jface.text.DefaultPositionUpdater;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextStore;
import org.eclipse.jface.text.Position;
@@ -139,7 +138,7 @@ public class BodyContentWriter implements BufferedJET2Writer
{
try
{
- document.replace(document.getLength(), 0, string);
+ document.replace(document.getLength(), 0, string != null ? string : "null"); //$NON-NLS-1$
}
catch (BadLocationException e)
{