Closed dant3 closed 9 years ago
+1
+1
+1 too
+1
+1
I agree, it should be merged. It is the fasteest way how to fix it.
But it doesn't fix real issue of this problem. Why is close() called twice? Also is interesting that it happen only on some device for me (like HTC).
Why is close() called twice?
It looks like a bug in ormlite-core actually.
Looks like StatementExecutor.queryForFirst() closes both the query result and the prepared statement. The latter closes the former in both JDBC and Android implementations.
Is it feasible to remove one of these, probably the former?
I'm going to take this merge request as opposed to changing StatementExecutor. There are a number of places where it closes both the statement and the result. Can anyone find docs that this is not the right thing to do?
The warning Android prints in logcat is: Close cursor android.database.sqlite.SQLiteCursor on null twice or more
SA: http://stackoverflow.com/questions/25245249/ormlite-sqlitecursor-close-cursor-on-null-twice-or-more