mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
safer iteration over list elements
This commit is contained in:
parent
6dd655941d
commit
1370a2db98
@ -523,10 +523,11 @@ 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();
|
||||
}
|
||||
entry.isActive = (Boolean) aValue;
|
||||
if (entry != null)
|
||||
entry.isActive = (Boolean) aValue;
|
||||
|
||||
initButtons();
|
||||
}
|
||||
|
@ -836,10 +836,11 @@ 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();
|
||||
}
|
||||
entry.isActive = (Boolean) aValue;
|
||||
if (entry != null)
|
||||
entry.isActive = (Boolean) aValue;
|
||||
if (getSelectedKeywords().isEmpty()) {
|
||||
deleteWordButton.setEnabled(false);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user