mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
safer iteration over list elements
This commit is contained in:
parent
6dd655941d
commit
1370a2db98
@ -523,9 +523,10 @@ public final class KeywordSearchListImportExportTopComponent extends TopComponen
|
||||
TableEntry entry = null;
|
||||
//iterate until row
|
||||
Iterator<TableEntry> it = listData.iterator();
|
||||
for (int i = 0; i <= rowIndex; ++i) {
|
||||
for (int i = 0; i <= rowIndex && it.hasNext(); ++i) {
|
||||
entry = it.next();
|
||||
}
|
||||
if (entry != null)
|
||||
entry.isActive = (Boolean) aValue;
|
||||
|
||||
initButtons();
|
||||
|
@ -836,9 +836,10 @@ public final class KeywordSearchListTopComponent extends TopComponent implements
|
||||
TableEntry entry = null;
|
||||
//iterate until row
|
||||
Iterator<TableEntry> it = keywordData.iterator();
|
||||
for (int i = 0; i <= rowIndex; ++i) {
|
||||
for (int i = 0; i <= rowIndex && it.hasNext(); ++i) {
|
||||
entry = it.next();
|
||||
}
|
||||
if (entry != null)
|
||||
entry.isActive = (Boolean) aValue;
|
||||
if (getSelectedKeywords().isEmpty()) {
|
||||
deleteWordButton.setEnabled(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user