Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a1344ef authored by Vasu Nori's avatar Vasu Nori
Browse files

limit sql statement in finalizer warning to 100 chars

too long a sql statement reduces the amount of stack trace printed.

Change-Id: Id980b184850adb2bcb5e47eebe35796bc731a490
parent aa773543
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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();