Skip to content

Commit 865ad5d

Browse files
committed
format; fix test
1 parent 95550ec commit 865ad5d

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

sentry/src/main/java/io/sentry/featureflags/FeatureFlagBuffer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,14 @@ public IFeatureFlagBuffer clone() {
139139
int currentIndex = currentSize - 1;
140140

141141
@Nullable
142-
FeatureFlagEntry globalEntry = globalFlags == null || globalIndex < 0 ? null : globalFlags.get(globalIndex);
142+
FeatureFlagEntry globalEntry =
143+
globalFlags == null || globalIndex < 0 ? null : globalFlags.get(globalIndex);
143144
@Nullable
144145
FeatureFlagEntry isolationEntry =
145146
isolationFlags == null || isolationIndex < 0 ? null : isolationFlags.get(isolationIndex);
146147
@Nullable
147-
FeatureFlagEntry currentEntry = currentFlags == null || currentIndex < 0 ? null : currentFlags.get(currentIndex);
148+
FeatureFlagEntry currentEntry =
149+
currentFlags == null || currentIndex < 0 ? null : currentFlags.get(currentIndex);
148150

149151
final @NotNull java.util.Map<String, FeatureFlagEntry> uniqueFlags =
150152
new java.util.LinkedHashMap<>(maxSize);

sentry/src/test/java/io/sentry/ScopesTest.kt

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3126,7 +3126,7 @@ class ScopesTest {
31263126
val (sut, mockClient) = getEnabledScopes()
31273127

31283128
sut.addFeatureFlag(null, true)
3129-
sut.addFeatureFlag("flag-1", true)
3129+
sut.addFeatureFlag("flag-1", null)
31303130
sut.addFeatureFlag(null, null)
31313131

31323132
sut.scope.addFeatureFlag(null, true)
@@ -3143,17 +3143,7 @@ class ScopesTest {
31433143

31443144
sut.captureException(RuntimeException("test exception"))
31453145

3146-
verify(mockClient)
3147-
.captureEvent(
3148-
any(),
3149-
check {
3150-
val featureFlags = it.featureFlags
3151-
assertNotNull(featureFlags)
3152-
3153-
assertEquals(0, featureFlags.values.size)
3154-
},
3155-
anyOrNull(),
3156-
)
3146+
verify(mockClient).captureEvent(any(), check { assertNull(it.featureFlags) }, anyOrNull())
31573147
}
31583148

31593149
private val dsnTest = "https://key@sentry.io/proj"

0 commit comments

Comments
 (0)