Skip to content

A-MoreErrorHandling: catch duplicates, bad input - #8

Merged
jingyucodes merged 2 commits into
masterfrom
branch-A-MoreErrorHandling
Sep 17, 2026
Merged

jingyucodes merged 2 commits into
masterfrom
branch-A-MoreErrorHandling

Conversation

@jingyucodes

Copy link
Copy Markdown
Owner

Adds duplicate-task detection, whitespace-tolerant clause parsing,
and a guard against descriptions containing the save file's field
separator.

See commit message for details.

jingyucodes and others added 2 commits September 17, 2026 22:16
Echo would silently accept a second copy of the same task, break a
deadline/event's clause detection on extra whitespace around /by,
/from, /to, and let a description containing the save file's own
field separator corrupt a later reload.

Add Task#isDuplicateOf (case-insensitive, description + type, plus
date(s) for Deadline/Event), exposed via TaskList#containsDuplicateOf
and checked in Echo#addTask before adding. Make Parser's /by, /from,
/to splits whitespace-tolerant (\s+ instead of a literal single
space) without touching whitespace inside descriptions themselves.
Reject any description containing Task.FILE_FORMAT_SEPARATOR before
it reaches storage.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@jingyucodes
jingyucodes merged commit 4cb5c42 into master Sep 17, 2026
6 checks passed
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.

1 participant