se-edu / addressbook-level3

:ab::three: Address Book sample application (Level 3)
https://se-education.org/addressbook-level3
MIT License
28 stars 415 forks source link

Coding standard violation on Storage component #147

Closed cheeheng closed 1 year ago

cheeheng commented 1 year ago

In the file src/main/java/seedu/address/storage/JsonAdaptedPerson.java on the master directory, I found out that the variable tagged is not in plural even though it represents a collection of objects, hence violating CS2103T coding standard.

Below shows lines 33-47 of the code for easy reference.

    /**
     * Constructs a {@code JsonAdaptedPerson} with the given person details.
     */
    @JsonCreator
    public JsonAdaptedPerson(@JsonProperty("name") String name, @JsonProperty("phone") String phone,
            @JsonProperty("email") String email, @JsonProperty("address") String address,
            @JsonProperty("tagged") List<JsonAdaptedTag> tagged) {
        this.name = name;
        this.phone = phone;
        this.email = email;
        this.address = address;
        if (tagged != null) {
            this.tagged.addAll(tagged);
        }
    }

Here is the relevant reference in the SE-EDU Java coding standard.

image
damithc commented 1 year ago

@cheeheng Good catch. Thanks for the bug report.