summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2006-11-25 19:28:42 +0000
committerMark Wielaard <mark@klomp.org>2006-11-25 19:28:42 +0000
commit150c84b7c5588c2085a7463af3c48ac3dbbdd5fa (patch)
treecd4460b789582a7bdf26d21dcea2e2fa31bd3419
parent276707783cc7f4ee9ea55c7f1dfcb0b2192db392 (diff)
downloadclasspath-150c84b7c5588c2085a7463af3c48ac3dbbdd5fa.tar.gz
* javax/swing/text/CompositeView.java (modelToView): Never return
null.
-rw-r--r--ChangeLog5
-rw-r--r--javax/swing/text/CompositeView.java10
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 533283c6b..319515b0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2006-11-25 Mark Wielaard <mark@klomp.org>
+ * javax/swing/text/CompositeView.java (modelToView): Never return
+ null.
+
+2006-11-25 Mark Wielaard <mark@klomp.org>
+
* javax/swing/text/html/TableView.java (calculateColumnRequirements):
Check whether rowView instanceof RowView.
(updateGrid): Likewise.
diff --git a/javax/swing/text/CompositeView.java b/javax/swing/text/CompositeView.java
index 90458b6f2..570fc955c 100644
--- a/javax/swing/text/CompositeView.java
+++ b/javax/swing/text/CompositeView.java
@@ -282,12 +282,12 @@ public abstract class CompositeView
}
}
}
- else
- {
- throw new BadLocationException("Position " + pos
- + " is not represented by view.", pos);
- }
}
+
+ if (ret == null)
+ throw new BadLocationException("Position " + pos
+ + " is not represented by view.", pos);
+
return ret;
}