Add error logging when removing empty voice commands and voice command strings#1799
Merged
JulianKast merged 3 commits into5.4.0_RCfrom Mar 25, 2022
Merged
Add error logging when removing empty voice commands and voice command strings#1799JulianKast merged 3 commits into5.4.0_RCfrom
JulianKast merged 3 commits into5.4.0_RCfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## 5.4.0_RC #1799 +/- ##
===========================================
Coverage ? 54.06%
Complexity ? 5522
===========================================
Files ? 562
Lines ? 25718
Branches ? 3370
===========================================
Hits ? 13905
Misses ? 10556
Partials ? 1257 |
JulianKast
requested changes
Mar 25, 2022
| if (trimmedString.length() > 0) { | ||
| voiceCommandStrings.add(trimmedString); | ||
| } else { | ||
| DebugTool.logWarning(TAG, "Empty voice command string removed"); |
Contributor
There was a problem hiding this comment.
Suggested change
| DebugTool.logWarning(TAG, "Empty voice command string removed"); | |
| DebugTool.logWarning(TAG, "Empty string removed from voice command"); |
| voiceCommand.setVoiceCommands(voiceCommandStrings); | ||
| validatedVoiceCommands.add(voiceCommand); | ||
| } else { | ||
| DebugTool.logWarning(TAG, "Empty voice command removed"); |
Contributor
There was a problem hiding this comment.
Suggested change
| DebugTool.logWarning(TAG, "Empty voice command removed"); | |
| DebugTool.logWarning(TAG, "Voice command will not be uploaded as it contained no valid strings"); |
| List<VoiceCommand> validatedVoiceCommands = new ArrayList<>(); | ||
| for (VoiceCommand voiceCommand : voiceCommands) { | ||
| if (voiceCommand == null) { | ||
| DebugTool.logWarning(TAG, "Null voice command removed"); |
Contributor
There was a problem hiding this comment.
Suggested change
| DebugTool.logWarning(TAG, "Null voice command removed"); | |
| DebugTool.logWarning(TAG, "Voice command is null, it will not be uploaded"); |
| List<String> voiceCommandStrings = new ArrayList<>(); | ||
| for (String voiceCommandString : voiceCommand.getVoiceCommands()) { | ||
| if (voiceCommandString == null) { | ||
| DebugTool.logWarning(TAG, "Null voice command string removed"); |
Contributor
There was a problem hiding this comment.
Suggested change
| DebugTool.logWarning(TAG, "Null voice command string removed"); | |
| DebugTool.logWarning(TAG, "Removing null string from Voice Command"); |
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 #1798
This PR is ready for review.
Risk
This PR makes no API changes.
Testing Plan
Unit Tests
N/A - This PR only adds logging
Core Tests
VoiceCommandcontaining no command stringsVoiceCommandto an HMI usingVoiceCommandManagerExpected Results: The
VoiceCommandfails to send and a warning is loggedObserved Results: The
VoiceCommandfails to send and a warning is loggedSummary
Adds more logging to
BaseVoiceCommandManager.removeEmptyVoiceCommands()Changelog
Breaking Changes
Enhancements
Bug Fixes
CLA