List of usage examples for java.lang ArrayStoreException ArrayStoreException
public ArrayStoreException()
ArrayStoreException
with no detail message. From source file:org.apache.jackrabbit.core.state.ChildNodeEntries.java
public Object[] toArray(Object[] a) { if (!a.getClass().getComponentType().isAssignableFrom(ChildNodeEntry.class)) { throw new ArrayStoreException(); }/* w w w . j a v a2s. c o m*/ if (a.length < size()) { a = new ChildNodeEntry[size()]; } MapIterator iter = entries.mapIterator(); int i = 0; while (iter.hasNext()) { iter.next(); a[i] = entries.getValue(i); i++; } while (i < a.length) { a[i++] = null; } return a; }