このエラーが発生するのはなぜですか? わかりません..例外をスローするコードは次のとおりです
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 . . .