Skip to content

[WFYishere] iP#915

Open
WFYishere wants to merge 68 commits into
nus-cs2103-AY2526S1:masterfrom
WFYishere:master
Open

[WFYishere] iP#915
WFYishere wants to merge 68 commits into
nus-cs2103-AY2526S1:masterfrom
WFYishere:master

Conversation

@WFYishere

Copy link
Copy Markdown

No description provided.

damithc and others added 30 commits July 11, 2024 16:52
In build.gradle, the dependencies on distZip and/or distTar causes
the shadowJar task to generate a second JAR file for which the
mainClass.set("seedu.duke.Duke") does not take effect.
Hence, this additional JAR file cannot be run.
For this product, there is no need to generate a second JAR file
to begin with.

Let's remove this dependency from the build.gradle to prevent the
shadowJar task from generating the extra JAR file.
…lete/mark/unmark; handle first-run & corrupted lines
Adding multiple tasks or printing multiple error lines requires
repetitive calls. The API forces callers to loop or chain calls.

Varargs simplify call sites while keeping existing calls working.

Let's
* change `TaskList.add(Task t)` to `add(Task... items)` (null-safe)
* change `Ui.showError(String message)` to `showError(String... messages)`
* keep backward compatibility so current code compiles unchanged

This reduces boilerplate and clarifies intent without widening scope.
Parser methods guarantee the command word contains no spaces and that
the remainder is trimmed; these properties were implicit and easy to
violate accidentally.

Event creation also assumes the start date does not come after the end
date. When that assumption is broken, the app behaves unpredictably.
…lauses

Date parsing/formatting is duplicated across Event and Deadline, which
invites divergence and subtle bugs. Storage uses inline delimiters and
ad-hoc regexes in multiple places, making the save/load format harder
to maintain.
WHAT: Verify MMM d yyyy formatting for a known date.
WHY: Guards against unintended formatter changes.
WHAT: Replace fully-qualified Dates calls with imported version.
WHY: Improves readability; no functional changes.
WHAT: Add Javadoc for containsDuplicate and dupKey.
WHY: Makes dedupe criteria explicit for future maintainers.
WHAT: Verify MMM d yyyy formatting for a known date.
WHY: Guards against unintended formatter changes.
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.

3 participants