Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Switch from logging error to logging warnings
  • Loading branch information
noah-livio committed Mar 25, 2022
commit c8195fd0158ad02d0be56c7312354ccdd90d03c2
Original file line number Diff line number Diff line change
Expand Up @@ -217,27 +217,27 @@ List<VoiceCommand> removeEmptyVoiceCommands(List<VoiceCommand> voiceCommands) {
List<VoiceCommand> validatedVoiceCommands = new ArrayList<>();
for (VoiceCommand voiceCommand : voiceCommands) {
if (voiceCommand == null) {
DebugTool.logError(TAG, "Null voice command removed");
DebugTool.logWarning(TAG, "Null voice command removed");
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
DebugTool.logWarning(TAG, "Null voice command removed");
DebugTool.logWarning(TAG, "Voice command is null, it will not be uploaded");

continue;
}
List<String> voiceCommandStrings = new ArrayList<>();
for (String voiceCommandString : voiceCommand.getVoiceCommands()) {
if (voiceCommandString == null) {
DebugTool.logError(TAG, "Null voice command string removed");
DebugTool.logWarning(TAG, "Null voice command string removed");
Copy link
Contributor

@JulianKast JulianKast Mar 25, 2022

Choose a reason for hiding this comment

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

Suggested change
DebugTool.logWarning(TAG, "Null voice command string removed");
DebugTool.logWarning(TAG, "Removing null string from Voice Command");

continue;
}
String trimmedString = voiceCommandString.trim();
if (trimmedString.length() > 0) {
voiceCommandStrings.add(trimmedString);
} else {
DebugTool.logError(TAG, "Empty voice command string removed");
DebugTool.logWarning(TAG, "Empty voice command string removed");
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
DebugTool.logWarning(TAG, "Empty voice command string removed");
DebugTool.logWarning(TAG, "Empty string removed from voice command");

}
}
if (voiceCommandStrings.size() > 0) {
voiceCommand.setVoiceCommands(voiceCommandStrings);
validatedVoiceCommands.add(voiceCommand);
} else {
DebugTool.logError(TAG, "Empty voice command removed");
DebugTool.logWarning(TAG, "Empty voice command removed");
Copy link
Contributor

@JulianKast JulianKast Mar 25, 2022

Choose a reason for hiding this comment

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

Suggested change
DebugTool.logWarning(TAG, "Empty voice command removed");
DebugTool.logWarning(TAG, "Voice command will not be uploaded as it contained no valid strings");

}
}
return validatedVoiceCommands;
Expand Down