mrmike/Simple-Android-Notepad — comment on commit 113db47cbccf3f39c59f97e080b76d637f7886d9
File:  line 0
By dualcnhq:

there's errors at the DBHelper class and the Simple_NotepadActivity in setNotes() method, it shows:

01-05 09:03:39.930: E/Cursor(7322): Finalizing a Cursor that has not been deactivated or closed. database = /data/data/com.traininghandouts.app/databases/notesDB.sqlite, table = notes, query = SELECT noteTitle, noteContent FROM notes ORDER BY id DESC
01-05 09:03:39.930: E/Cursor(7322): android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
01-05 09:03:39.930: E/Cursor(7322):	at android.database.sqlite.SQLiteCursor.(SQLiteCursor.java:210)
01-05 09:03:39.930: E/Cursor(7322):	at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:53)
01-05 09:03:39.930: E/Cursor(7322):	at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1345)
01-05 09:03:39.930: E/Cursor(7322):	at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1229)
01-05 09:03:39.930: E/Cursor(7322):	at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1184)
01-05 09:03:39.930: E/Cursor(7322):	at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1264)
01-05 09:03:39.930: E/Cursor(7322):	at com.traininghandouts.note.DatabaseHelper.getNotes(DatabaseHelper.java:78)
01-05 09:03:39.930: E/Cursor(7322):	at com.traininghandouts.app.Notes.setNotes(Notes.java:87)
01-05 09:03:39.930: E/Cursor(7322):	at com.traininghandouts.app.Notes.onCreate(Notes.java:60)
01-05 09:03:39.930: E/Cursor(7322):	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-05 09:03:39.930: E/Cursor(7322):	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
01-05 09:03:39.930: E/Cursor(7322):	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
01-05 09:03:39.930: E/Cursor(7322):	at android.app.ActivityThread.access$2300(ActivityThread.java:125)
01-05 09:03:39.930: E/Cursor(7322):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
01-05 09:03:39.930: E/Cursor(7322):	at android.os.Handler.dispatchMessage(Handler.java:99)
01-05 09:03:39.930: E/Cursor(7322):	at android.os.Looper.loop(Looper.java:123)
01-05 09:03:39.930: E/Cursor(7322):	at android.app.ActivityThread.main(ActivityThread.java:4627)
01-05 09:03:39.930: E/Cursor(7322):	at java.lang.reflect.Method.invokeNative(Native Method)
01-05 09:03:39.930: E/Cursor(7322):	at java.lang.reflect.Method.invoke(Method.java:521)
01-05 09:03:39.930: E/Cursor(7322):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-05 09:03:39.930: E/Cursor(7322):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-05 09:03:39.930: E/Cursor(7322):	at dalvik.system.NativeStart.main(Native Method)

how can i fix it?