Skip to content
This repository has been archived by the owner on Jul 13, 2020. It is now read-only.

SingleColumnParser/ScalarColumnParser: wrong precondition #45

Closed
jhonnen opened this issue May 19, 2015 · 1 comment
Closed

SingleColumnParser/ScalarColumnParser: wrong precondition #45

jhonnen opened this issue May 19, 2015 · 1 comment

Comments

@jhonnen
Copy link

jhonnen commented May 19, 2015

Both parseRow() methods throw an exception if the column count is != 0 instead of when it is != 1:

override fun parseRow(columns: Array): T {
    if (columns.size() != 0)
        throw SQLiteException("Invalid row: row for SingleColumnParser must contain exactly one column")
    [suppress("UNCHECKED_CAST")]
    return columns[0] as T
}
@yanex
Copy link
Member

yanex commented May 26, 2015

Fixed. Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants