-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DAT 3464 #166
DAT 3464 #166
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion for change to information in the message
int index = checkArg(args[i]); | ||
if (index >= 0) { | ||
String message = | ||
"Invalid, non-printable character detected in command line at position " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should mention the code point in the message for easier debugging. "Invalid, non printable character #${index} detected in command line..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops - just realized the return value is the index where the character is found, not which character was found. Could change the logic of checkArg to return a struct with both values - what was found and where.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@wwillard7800 ~ Can a unit test be provided to cover this code to assert that valid characters are not interfered with and invalid characters are removed as expected? |
Merged in as liquibase#955 |
No description provided.