Skip to content

fix(android): convert outlineColor values before delegation#57558

Open
whizzkid1452 wants to merge 2 commits into
react:mainfrom
whizzkid1452:bug/outline-color-conversion
Open

fix(android): convert outlineColor values before delegation#57558
whizzkid1452 wants to merge 2 commits into
react:mainfrom
whizzkid1452:bug/outline-color-conversion

Conversation

@whizzkid1452

@whizzkid1452 whizzkid1452 commented Jul 15, 2026

Copy link
Copy Markdown

Summary

  • Convert Android outlineColor values with ColorPropConverter before delegating them to the view manager.
  • Preserve the nullable color contract by using the converter overload without a default value.
  • Add a regression test for Double color values that previously threw ClassCastException.

Fixes #57190

Changelog:

[Android] [Fixed] - Fix crashes when outlineColor is provided as a numeric color value

Test plan

  • Confirmed that the regression test fails with ClassCastException before the fix
  • BaseViewManagerDelegateTest
  • :packages:react-native:ReactAndroid:test
  • npx prettier --write .
  • Full JavaScript lint: stops while loading @react-native/specs/react-native-modules for the unchanged NativeDevMenu.js file with SyntaxError: Unexpected token '{'

@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 Jul 15, 2026
@whizzkid1452 whizzkid1452 changed the title fix(android): outlineColor 숫자 변환 오류 수정 fix(android): convert outlineColor values before delegation Jul 15, 2026
@whizzkid1452 whizzkid1452 force-pushed the bug/outline-color-conversion branch from e110484 to 7435ea2 Compare July 15, 2026 07:50
@whizzkid1452 whizzkid1452 marked this pull request as ready for review July 15, 2026 07:51
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jul 15, 2026
ViewProps.OUTLINE_COLOR ->
mViewManager.setOutlineColor(
view,
// outlineColor의 nullable 계약을 보존하기 위해 기본값이 없는 변환을 사용한다.

@Abbondanzo Abbondanzo Jul 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the contribution! Could you convert this code comment to English?

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. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BaseViewManagerDelegate crashes on outlineColor (Double cannot be cast to Integer)

2 participants