sbe fix on collections toArray(Object[])

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@390374 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2006-03-31 09:03:44 +00:00
parent e44aee930e
commit 2af7d9836e
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class ContainerValueCollection extends ContainerCollectionSupport implements Col
public Object[] toArray(Object[] result){
List list=container.getItemList();
synchronized(list){
if(result.length<list.size()){
if(result.length<=list.size()){
int count=0;
result=(Object[]) java.lang.reflect.Array.newInstance(result.getClass().getComponentType(),list.size());
for(Iterator i=list.iterator();i.hasNext();){