File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed
Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1061,7 +1061,7 @@ public abstract interface class io/sentry/IScopesStorage {
10611061}
10621062
10631063public abstract interface class io/sentry/IScopesStorageFactory {
1064- public abstract fun create ()Lio/sentry/IScopesStorage;
1064+ public abstract fun create (Lio/sentry/SentryOptions; )Lio/sentry/IScopesStorage;
10651065}
10661066
10671067public abstract interface class io/sentry/ISentryClient {
Original file line number Diff line number Diff line change 77@ ApiStatus .Experimental
88public interface IScopesStorageFactory {
99 @ NotNull
10- IScopesStorage create ();
10+ IScopesStorage create (@ NotNull SentryOptions options );
1111}
Original file line number Diff line number Diff line change @@ -440,7 +440,7 @@ private static void initFatalLogger(final @NotNull SentryOptions options) {
440440 private static void initScopesStorage (SentryOptions options ) {
441441 getScopesStorage ().close ();
442442 if (options .getScopesStorageFactory () != null ) {
443- scopesStorage = options .getScopesStorageFactory ().create ();
443+ scopesStorage = options .getScopesStorageFactory ().create (options );
444444 scopesStorage .init ();
445445 } else if (SentryOpenTelemetryMode .OFF == options .getOpenTelemetryMode ()) {
446446 scopesStorage = new DefaultScopesStorage ();
Original file line number Diff line number Diff line change @@ -974,15 +974,15 @@ class SentryOptionsTest {
974974 @Test
975975 fun `scopesStorageFactory can be set and retrieved` () {
976976 val options = SentryOptions ()
977- val factory = IScopesStorageFactory { DefaultScopesStorage () }
977+ val factory = IScopesStorageFactory { _ -> DefaultScopesStorage () }
978978 options.scopesStorageFactory = factory
979979 assertSame(factory, options.scopesStorageFactory)
980980 }
981981
982982 @Test
983983 fun `scopesStorageFactory can be set to null` () {
984984 val options = SentryOptions ()
985- val factory = IScopesStorageFactory { DefaultScopesStorage () }
985+ val factory = IScopesStorageFactory { _ -> DefaultScopesStorage () }
986986 options.scopesStorageFactory = factory
987987 options.scopesStorageFactory = null
988988 assertNull(options.scopesStorageFactory)
Original file line number Diff line number Diff line change @@ -1732,7 +1732,7 @@ class SentryTest {
17321732
17331733 initForTest {
17341734 it.dsn = dsn
1735- it.scopesStorageFactory = IScopesStorageFactory { customStorage }
1735+ it.scopesStorageFactory = IScopesStorageFactory { _ -> customStorage }
17361736 }
17371737
17381738 verify(customStorage).init ()
@@ -1758,7 +1758,7 @@ class SentryTest {
17581758
17591759 initForTest {
17601760 it.dsn = dsn
1761- it.scopesStorageFactory = IScopesStorageFactory {
1761+ it.scopesStorageFactory = IScopesStorageFactory { _ ->
17621762 factoryCalled.set(true )
17631763 backingStorage
17641764 }
You can’t perform that action at this time.
0 commit comments