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

Escape CSV characters and save fulfilled orders to storage #243

Merged
merged 3 commits into from
Nov 11, 2024

Conversation

yakultbottle
Copy link
Collaborator

Closes #239

@yakultbottle yakultbottle added this to the v2.1 milestone Nov 11, 2024
@yakultbottle yakultbottle marked this pull request as ready for review November 11, 2024 19:39
Copy link
Collaborator

@yijiano yijiano left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@yakultbottle yakultbottle merged commit b3f9d68 into AY2425S1-CS2113-W14-4:master Nov 11, 2024
3 checks passed
@yakultbottle yakultbottle deleted the csv-fix branch November 11, 2024 19:48
Copy link

@cnivedit cnivedit left a 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);

Choose a reason for hiding this comment

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

Nice catch!

Comment on lines +26 to +33
private static String escapeCommas(String input) {
return input.replace(",", "\\,");
}

private static String unescapeCommas(String input) {
return input.replace("\\,", ",");
}

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

Comment on lines +578 to +582
/*
if (itemName.contains(",")) {
throw new PillException(ExceptionMessages.INVALID_ITEM_NAME);
}
*/

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fulfilling order does not update text file
3 participants