summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gilbert <david.gilbert@object-refinery.com>2006-11-22 22:45:11 +0000
committerDavid Gilbert <david.gilbert@object-refinery.com>2006-11-22 22:45:11 +0000
commit1d167e16248e0000809fed3b3b2ad13225110625 (patch)
tree1c688988aebb82245d35f144bd2bb96203c43f92
parent23adb0f0cb7cce0c85bba049acb23559016431b7 (diff)
downloadclasspath-1d167e16248e0000809fed3b3b2ad13225110625.tar.gz
2006-11-22 David Gilbert <david.gilbert@object-refinery.com>
* java/beans/beancontext/BeanContextSupport.java (toArray): Added API docs, (toArray(Object[])): Added API docs, removed NotImplementedException.
-rw-r--r--ChangeLog6
-rw-r--r--java/beans/beancontext/BeanContextSupport.java17
2 files changed, 20 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 408829dd2..f1bbfdab0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-11-22 David Gilbert <david.gilbert@object-refinery.com>
+
+ * java/beans/beancontext/BeanContextSupport.java
+ (toArray): Added API docs,
+ (toArray(Object[])): Added API docs, removed NotImplementedException.
+
2006-11-22 Tania Bento <tbento@redhat.com>
* javax/swing/JRootPane.java
diff --git a/java/beans/beancontext/BeanContextSupport.java b/java/beans/beancontext/BeanContextSupport.java
index 951cf0efe..a7d641bf2 100644
--- a/java/beans/beancontext/BeanContextSupport.java
+++ b/java/beans/beancontext/BeanContextSupport.java
@@ -876,7 +876,12 @@ public class BeanContextSupport extends BeanContextChildSupport
}
}
- public Object[] toArray ()
+ /**
+ * Returns an array containing the children of this <code>BeanContext</code>.
+ *
+ * @return An array containing the children.
+ */
+ public Object[] toArray()
{
synchronized (children)
{
@@ -884,10 +889,16 @@ public class BeanContextSupport extends BeanContextChildSupport
}
}
+ /**
+ * Populates, then returns, the supplied array with the children of this
+ * <code>BeanContext</code>. If the array is too short to hold the
+ * children, a new array is allocated and returned. If the array is too
+ * long, it is padded with <code>null</code> items at the end.
+ *
+ * @param array an array to populate (<code>null</code> not permitted).
+ */
public Object[] toArray(Object[] array)
- throws NotImplementedException
{
- // This implementation is incorrect, I think.
synchronized (children)
{
return children.keySet().toArray(array);