diff options
| author | Vasu Nori <vnori@google.com> | 2010-03-19 10:38:29 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-03-19 10:38:29 -0700 |
| commit | cd40c355be1f59a43fb75518e48ad650c68c96ae (patch) | |
| tree | a83e4ad8e3a3fef399367265927be88db1ea6990 /core/java | |
| parent | 408f333b43de796a7993d56c0fd7af23d2bdc959 (diff) | |
| parent | 0a1344efc268283a16c04d932722e7824114185a (diff) | |
Merge "limit sql statement in finalizer warning to 100 chars"
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/database/sqlite/SQLiteCompiledSql.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/database/sqlite/SQLiteCompiledSql.java b/core/java/android/database/sqlite/SQLiteCompiledSql.java index 816f8a8ff4dd..72ceb9baeb6b 100644 --- a/core/java/android/database/sqlite/SQLiteCompiledSql.java +++ b/core/java/android/database/sqlite/SQLiteCompiledSql.java @@ -139,7 +139,10 @@ import android.util.Log; if (SQLiteDebug.DEBUG_ACTIVE_CURSOR_FINALIZATION) { Log.v(TAG, "** warning ** Finalized DbObj (id#" + nStatement + ")"); } - Log.w(TAG, "finalizer should never be called on sql: " + mSqlStmt, mStackTrace); + int len = mSqlStmt.length(); + Log.w(TAG, "Releasing statement in a finalizer. Please ensure " + + "that you explicitly call close() on your cursor: " + + mSqlStmt.substring(0, (len > 100) ? 100 : len), mStackTrace); releaseSqlStatement(); } finally { super.finalize(); |
