Add multiple checks to supportsSoftButtonImages()#1801
Merged
JulianKast merged 1 commit into5.4.0_RCfrom Apr 8, 2022
Merged
Conversation
This commit adds null checks and a List.size() check to PresentAlertOperation.supportsSoftButtonImages() These checks prevent crashes and returns true when soft button capabilities are unavailable This new behavior improves alignment with the other SDL libraries
Codecov Report
@@ Coverage Diff @@
## 5.4.0_RC #1801 +/- ##
==============================================
- Coverage 54.05% 54.04% -0.02%
Complexity 5519 5519
==============================================
Files 562 562
Lines 25723 25728 +5
Branches 3372 3375 +3
==============================================
Hits 13904 13904
- Misses 10562 10563 +1
- Partials 1257 1261 +4
|
JulianKast
approved these changes
Apr 6, 2022
JulianKast
approved these changes
Apr 8, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1800
This PR is ready for review.
Risk
This PR makes no API changes.
Testing Plan
Unit Tests
N/A
Core Tests
On Core, I ran the following code in
testBlank()of a local clone of sdl_test_suite_java and a modified local copy of sdl_java_suite in whichPresentAlertOperation.supportSoftButtonImages()is public.Test Code
Core version / branch / commit hash / module tested against: Core release/8.1.0 b30f01258aeea4ec4c9cde22e942f091ade1cbfb
HMI name / version / branch / commit hash / module tested against: Generic HMI release/0.12.0 3ec306d2521f5151c215e4d98d9a230d6c544d6e
Summary
This PR adds null checks and a
List.size()check toPresentAlertOperation.supportsSoftButtonImages(). These checks prevent crashes and returns true when soft button capabilities are unavailable. This new behavior improves alignment with the other SDL libraries.Changelog
Breaking Changes
Enhancements
Bug Fixes
CLA