为什么我会收到此错误?我不明白..这是引发异常的代码
public static final int getItemDefinitionsSize(Store store) {
int lastArchiveId = store.getIndexes()[19].getLastArchiveId();
return lastArchiveId * 256
+ store.getIndexes()[19].getValidFilesCount(lastArchiveId);
}
这是例外本身。
java.lang.ArrayIndexOutOfBoundsException: 19
at com.alex.Utils.getItemDefinitionsSize(Utils.java:50)
at Kjs.Application.addAllItems(Application.java:186)
at Kjs.Application.initialize(Application.java:182)
at Kjs.Application.<init>(Application.java:52)
at Kjs.Application$1.run(Application.java:39)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Press any key to continue . . .