/** * Returns the element at the specified position in this list. * <p/> * An object is guaranteed to be returned since it will create empty beans to fill the gap * between the current list size and the requested index. * * @param index index of element to return. * @return the element at the specified position in this list. */ @Override public synchronized Object get(int index) { while (index >= this.size()) { try { this.add(getObjectFactory().buildBean(clazz, ActionContext.getContext().getContextMap())); } catch (Exception e) { throw new XWorkException(e); } } return super.get(index); }