I keep getting ArrayIndexOutOfBoundsException in Database Explorer when there is lots of triggers in database. Interestingly, the exception shows when activating the Objects tab, and not the Triggers tab, as I would expect.
2022年12月07日 11:20:54 ERROR Error retrieving table list Index 419 out of bounds for length 150
java.lang.ArrayIndexOutOfBoundsException: Index 419 out of bounds for length 150
at workbench.storage.RowDataList.get(RowDataList.java:171)
at workbench.storage.DataStore.getRow(DataStore.java:1440)
at workbench.storage.DataStore.getValue(DataStore.java:1029)
at workbench.storage.DataStore.getValueAsString(DataStore.java:1075)
at workbench.db.TriggerListDataStore.getColumnValue(TriggerListDataStore.java:140)
at workbench.db.TriggerListDataStore.getTriggerName(TriggerListDataStore.java:69)
at workbench.db.postgres.PostgresEventTriggerReader.extendObjectList(PostgresEventTriggerReader.java:74)
at workbench.db.DbMetadata.getObjects(DbMetadata.java:1772)
at workbench.db.DbMetadata.getObjects(DbMetadata.java:1504)
at workbench.gui.dbobjects.TableListPanel.retrieve(TableListPanel.java:1219)
at workbench.gui.dbobjects.TableListPanel4ドル.run(TableListPanel.java:1341)
If I filter out displaying EVENT TRIGGERS in Object tab, then the exception is gone.
In the database there are only 5 event triggers, but the total number of event triggers and table triggers is 420, which concides with the exception message: Index 419 out of bounds for length 150. The number 150 is defined in the class workbench.storage.RowDataList as int DEFAULT_SIZE = 150;
The error is present in v. 129 of SQLWorkbench/J. There is no problem with v. 127, which i use routinely.
My settings:
SQL Workbench/J: v. 129 64bit
Java: 11.0.15 64bit
Postgres: 9.5.4