summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Kennke <roman@kennke.org>2006-10-04 15:35:35 +0000
committerRoman Kennke <roman@kennke.org>2006-10-04 15:35:35 +0000
commit14cd624f21df4e239199f694e0c11ceb14b90a6f (patch)
tree5a353f30cc3507db0483f5a85ecb7b1b4486938f
parent048b6eefb5735dec24b06742e0459725f8bd86b4 (diff)
downloadclasspath-14cd624f21df4e239199f694e0c11ceb14b90a6f.tar.gz
2006-10-04 Roman Kennke <kennke@aicas.com>generics-merge-20061004
* javax/swing/tree/VariableHeightLayoutCache.java (getBounds): When rect is null, create a new Rectangle.
-rw-r--r--ChangeLog5
-rw-r--r--javax/swing/tree/VariableHeightLayoutCache.java6
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f6c3a608c..ab44b787a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-10-04 Roman Kennke <kennke@aicas.com>
+
+ * javax/swing/tree/VariableHeightLayoutCache.java
+ (getBounds): When rect is null, create a new Rectangle.
+
2006-10-04 Christian Thalinger <twisti@complang.tuwien.ac.at>
* native/jni/java-nio/javanio.c (cpnio_read, cpnio_readv)
diff --git a/javax/swing/tree/VariableHeightLayoutCache.java b/javax/swing/tree/VariableHeightLayoutCache.java
index 1b85fb13d..4d5309fac 100644
--- a/javax/swing/tree/VariableHeightLayoutCache.java
+++ b/javax/swing/tree/VariableHeightLayoutCache.java
@@ -339,6 +339,12 @@ public class VariableHeightLayoutCache
return null;
if (dirty)
update();
+
+ // The RI allows null arguments for rect, in which case a new Rectangle
+ // is created.
+ if (rect == null)
+ rect = new Rectangle();
+
Object last = path.getLastPathComponent();
NodeRecord r = (NodeRecord) nodes.get(last);
if (r == null)