-
Notifications
You must be signed in to change notification settings - Fork 5
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
Escape CSV characters and save fulfilled orders to storage #243
Escape CSV characters and save fulfilled orders to storage #243
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.
LGTM, thanks
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.
LGTM
@@ -25,7 +25,7 @@ public final class Pill { | |||
*/ | |||
public void run() { | |||
items = storage.loadData(); | |||
transactionManager = new TransactionManager(items); | |||
transactionManager = new TransactionManager(items, storage); |
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 catch!
private static String escapeCommas(String input) { | ||
return input.replace(",", "\\,"); | ||
} | ||
|
||
private static String unescapeCommas(String input) { | ||
return input.replace("\\,", ","); | ||
} | ||
|
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.
Well done with the alternative solution
/* | ||
if (itemName.contains(",")) { | ||
throw new PillException(ExceptionMessages.INVALID_ITEM_NAME); | ||
} | ||
*/ |
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.
Consider removing unused commented out code
Closes #239