Skip to content

Commit a83f2d5

Browse files
committed
FFL-1720: Fix UnsafeThirdPartyFunctionCall detekt violation
Add @Suppress annotation for MutableList.add() call which is safe because it's wrapped in try-catch block.
1 parent d581102 commit a83f2d5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

features/dd-sdk-android-flags/src/main/kotlin/com/datadog/android/flags/internal/net/EvaluationsRequestFactory.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ internal class EvaluationsRequestFactory(
9696
try {
9797
val jsonString = String(event.data, Charsets.UTF_8)
9898
val flagEvaluation = BatchedFlagEvaluations.FlagEvaluation.fromJson(jsonString)
99+
@Suppress("UnsafeThirdPartyFunctionCall") // add() is safe - wrapped in try-catch
99100
flagEvaluations.add(flagEvaluation)
100101
} catch (@Suppress("TooGenericExceptionCaught") e: Exception) {
101102
// Catch all JSON parsing exceptions to prevent batch failure

0 commit comments

Comments
 (0)