Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[wpilibj] Shuffleboard: Check for null sendable #4772

Merged
merged 2 commits into from
Dec 7, 2022

Conversation

PeterJohnson
Copy link
Member

@PeterJohnson PeterJohnson commented Dec 6, 2022

Adding a null sendable to a container could result in a delayed NullPointerException.

Fixes https://github.com/wpilibsuite/BetaTest/issues/154

C++ doesn't have this issue because it takes a Sendable reference rather than a pointer.

Adding a null sendable to a container could result in a delayed NullPointerException.
@PeterJohnson PeterJohnson requested a review from a team as a code owner December 6, 2022 17:08
Copy link
Member

@Starlight220 Starlight220 left a comment

Choose a reason for hiding this comment

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

Use ErrorMessages.requireNonNullParam() instead.

@PeterJohnson
Copy link
Member Author

It sounds like we should do a global update to ErrorMessages in a separate PR?

@PeterJohnson PeterJohnson merged commit be27171 into wpilibsuite:main Dec 7, 2022
@PeterJohnson PeterJohnson deleted the shuffleboard-null-check branch December 7, 2022 05:14
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants