Skip to content

Commit 02edd2a

Browse files
committed
Use lambda for nanoTimeProvider default
Method reference `System::nanoTime` compiles to FunctionReferenceImpl, which breaks R8 in the SDK size test app.
1 parent 4c67ea9 commit 02edd2a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import io.sentry.SentryLevel
2222
* ```
2323
*
2424
* **Warning:** Do not use [SentrySQLiteDriver] together with
25-
* [io.sentry.android.sqlite.SentrySupportSQLiteOpenHelper] on the same database file. Both wrappers
26-
* instrument at different layers, so combining them will produce duplicate spans for every SQL
27-
* statement.
25+
* [SentrySupportSQLiteOpenHelper][io.sentry.android.sqlite.SentrySupportSQLiteOpenHelper] on the
26+
* same database file. Both wrappers instrument at different layers, so combining them will produce
27+
* duplicate spans for every SQL statement.
2828
*
2929
* @param delegate The [SQLiteDriver] instance to delegate calls to.
3030
*/

sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteStatement.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ internal class SentrySQLiteStatement(
2020
private val delegate: SQLiteStatement,
2121
private val spanRecorder: SQLiteSpanRecorder,
2222
private val sql: String,
23-
private val nanoTimeProvider: () -> Long = System::nanoTime,
23+
private val nanoTimeProvider: () -> Long = { System.nanoTime() },
2424
) : SQLiteStatement by delegate {
2525

2626
private var firstStepTimestamp: SentryDate? = null

0 commit comments

Comments
 (0)