Skip to content

Fix KotlinNullableVariableCastToNonnullType: Use safe casts in InterpolationAnimatedNode#55812

Open
mdvacca wants to merge 1 commit intofacebook:mainfrom
mdvacca:export-D92133946
Open

Fix KotlinNullableVariableCastToNonnullType: Use safe casts in InterpolationAnimatedNode#55812
mdvacca wants to merge 1 commit intofacebook:mainfrom
mdvacca:export-D92133946

Conversation

@mdvacca
Copy link
Contributor

@mdvacca mdvacca commented Feb 27, 2026

Summary:
Fixed KotlinNullableVariableCastToNonnullType lint errors in InterpolationAnimatedNode.kt.

The outputRange field is nullable (Any?) but was being cast directly to non-null types
(DoubleArray, IntArray, Array<DoubleArray>) in the update() method. Changed to use
safe casts (as?) with ?.let blocks to handle the null case gracefully.

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D92133946

@meta-codesync
Copy link

meta-codesync bot commented Feb 27, 2026

@mdvacca has exported this pull request. If you are a Meta employee, you can view the originating Diff in D92133946.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 27, 2026
Copy link
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

mdvacca added a commit to mdvacca/react-native that referenced this pull request Feb 27, 2026
…olationAnimatedNode (facebook#55812)

Summary:

Fixed KotlinNullableVariableCastToNonnullType lint errors in InterpolationAnimatedNode.kt.

The `outputRange` field is nullable (`Any?`) but was being cast directly to non-null types
(`DoubleArray`, `IntArray`, `Array<DoubleArray>`) in the `update()` method. Changed to use
safe casts (`as?`) with `?.let` blocks to handle the null case gracefully.

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D92133946
mdvacca added a commit to mdvacca/react-native that referenced this pull request Feb 27, 2026
…olationAnimatedNode (facebook#55812)

Summary:

Fixed KotlinNullableVariableCastToNonnullType lint errors in InterpolationAnimatedNode.kt.

The `outputRange` field is nullable (`Any?`) but was being cast directly to non-null types
(`DoubleArray`, `IntArray`, `Array<DoubleArray>`) in the `update()` method. Changed to use
safe casts (`as?`) with `?.let` blocks to handle the null case gracefully.

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D92133946
mdvacca added a commit to mdvacca/react-native that referenced this pull request Feb 27, 2026
…olationAnimatedNode (facebook#55812)

Summary:
Pull Request resolved: facebook#55812

Fixed KotlinNullableVariableCastToNonnullType lint errors in InterpolationAnimatedNode.kt.

The `outputRange` field is nullable (`Any?`) but was being cast directly to non-null types
(`DoubleArray`, `IntArray`, `Array<DoubleArray>`) in the `update()` method. Changed to use
safe casts (`as?`) with `?.let` blocks to handle the null case gracefully.

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D92133946
…olationAnimatedNode (facebook#55812)

Summary:

Fixed KotlinNullableVariableCastToNonnullType lint errors in InterpolationAnimatedNode.kt.

The `outputRange` field is nullable (`Any?`) but was being cast directly to non-null types
(`DoubleArray`, `IntArray`, `Array<DoubleArray>`) in the `update()` method. Changed to use
safe casts (`as?`) with `?.let` blocks to handle the null case gracefully.

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D92133946
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants