Skip to content

Commit

Permalink
fix filter not work
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcsgit committed Feb 26, 2021
1 parent ab04648 commit 293dd7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/com/blogspot/kotlinstudy/lognote/LogTableModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ class LogTableModel() : AbstractTableModel() {
}
Thread.sleep(100)
} catch (e:Exception) {
println("loadItems thread e : $e")
e.printStackTrace()
}
}
}
Expand Down Expand Up @@ -565,7 +565,7 @@ class LogTableModel() : AbstractTableModel() {

override fun getValueAt(rowIndex: Int, columnIndex: Int): Any {
try {
if (mLogItems.size > rowIndex) {
if (rowIndex >= 0 && mLogItems.size > rowIndex) {
val logItem = mLogItems[rowIndex]
if (columnIndex == COLUMN_NUM) {
return logItem.mNum + " "
Expand All @@ -574,7 +574,7 @@ class LogTableModel() : AbstractTableModel() {
}
}
} catch (e:ArrayIndexOutOfBoundsException) {
System.out.println("e : " + e.toString())
e.printStackTrace()
}

return -1
Expand Down

0 comments on commit 293dd7e

Please sign in to comment.