Skip to content
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

Closed
wants to merge 4 commits into from
Closed

DAT 3464 #166

wants to merge 4 commits into from

Conversation

wwillard7800
Copy link

No description provided.

Copy link

@SteveDonie SteveDonie left a 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 " +

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..."

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.

Copy link

@SteveDonie SteveDonie left a comment

Choose a reason for hiding this comment

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

Nice!

@bbrown-at-datical
Copy link

@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?

@nvoxland
Copy link

nvoxland commented Jan 2, 2020

Merged in as liquibase#955

@nvoxland nvoxland closed this Jan 2, 2020
@nvoxland nvoxland deleted the DAT-3464 branch January 2, 2020 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants