mirror of https://github.com/apache/activemq.git
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:
parent
e44aee930e
commit
2af7d9836e
|
@ -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();){
|
||||
|
|
Loading…
Reference in New Issue