diff options
author | David Gilbert <david.gilbert@object-refinery.com> | 2006-11-22 22:45:11 +0000 |
---|---|---|
committer | David Gilbert <david.gilbert@object-refinery.com> | 2006-11-22 22:45:11 +0000 |
commit | 1d167e16248e0000809fed3b3b2ad13225110625 (patch) | |
tree | 1c688988aebb82245d35f144bd2bb96203c43f92 | |
parent | 23adb0f0cb7cce0c85bba049acb23559016431b7 (diff) | |
download | classpath-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-- | ChangeLog | 6 | ||||
-rw-r--r-- | java/beans/beancontext/BeanContextSupport.java | 17 |
2 files changed, 20 insertions, 3 deletions
@@ -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); |