isLast() and empty ResultSet
От | Ruediger Herrmann |
---|---|
Тема | isLast() and empty ResultSet |
Дата | |
Msg-id | 6626.1114117809@www66.gmx.net обсуждение исходный текст |
Ответы |
Re: isLast() and empty ResultSet
Re: isLast() and empty ResultSet |
Список | pgsql-jdbc |
Hello, I implemented an Iterator interface iterating over a ResultSet. Therefore I rely on isLast() to implement the Iterator#hasNext() method. This works fine unless the whole ResultSet is empty. For empty RresultSets, isLast always returns true. Stepping through the code I found the reason therefore. Line 544 of AbstractJdbc2ResultSet says if (rows_size == 0) return false; // No rows. At least to me this is suspicious as I would return the opposite. Might that be a bug or is there any other reason to behave like this? I am using JDBC Driver 8.0 Build 311 and Server Version 8.0.2. Regards Rüdiger -- +++ NEU: GMX DSL_Flatrate! Schon ab 14,99 EUR/Monat! +++ GMX Garantie: Surfen ohne Tempo-Limit! http://www.gmx.net/de/go/dsl
В списке pgsql-jdbc по дате отправления: