SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

Kotlin: fix static code analysis weak warnings (5/n) (#52337)

Summary:
Static code analysis reports several weak warnings, many of which seem to be leftovers after Kotlin migration. This PR addresses quite a few:

- [Unnecessary type argument](https://www.jetbrains.com/help/inspectopedia/RemoveExplicitTypeArguments.html)
- [Variable declaration could be moved inside 'when'](https://www.jetbrains.com/help/inspectopedia/MoveVariableDeclarationIntoWhen.html)
- [Assignment can be replaced with operator assignment](https://www.jetbrains.com/help/inspectopedia/AssignmentReplaceableWithOperatorAssignment.html)
- [Negated call can be simplified](https://www.jetbrains.com/help/inspectopedia/SimplifyNegatedBinaryExpression.html)

## Changelog:

[INTERNAL] - Kotlin: fix static code analysis weak warnings (5/n)

Pull Request resolved: https://github.com/facebook/react-native/pull/52337

Test Plan:
```sh
yarn android
yarn test-android
```

Reviewed By: cortinico

Differential Revision: D77525702

Pulled By: rshest

fbshipit-source-id: b0bd2e7616340c22b22e7f58387c53c51cbf073e
M
Mateo Guzmán committed
73e513280d5fcdd7a4b4142f4ebbb04ee5ebbe08
Parent: 9a2c422
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 6/30/2025, 10:38:26 AM