From fe1fef86066a5eceae2db2ec7dd08071f85fb458 Mon Sep 17 00:00:00 2001 From: Donald Coffin Date: Sat, 20 Dec 2025 01:00:41 -0500 Subject: [PATCH] refactor: remove minimum required fields constructor from ApplicationInformationDto Removed the 4-parameter convenience constructor. DTO now has only: 1. Default no-arg constructor (required for JAXB) 2. Canonical constructor with all 37 fields (auto-generated by record) All 18 integration tests passing (H2, MySQL, PostgreSQL). Resolves #40 --- .../common/dto/usage/ApplicationInformationDto.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/openespi-common/src/main/java/org/greenbuttonalliance/espi/common/dto/usage/ApplicationInformationDto.java b/openespi-common/src/main/java/org/greenbuttonalliance/espi/common/dto/usage/ApplicationInformationDto.java index 602b8384..aaf5e5fd 100644 --- a/openespi-common/src/main/java/org/greenbuttonalliance/espi/common/dto/usage/ApplicationInformationDto.java +++ b/openespi-common/src/main/java/org/greenbuttonalliance/espi/common/dto/usage/ApplicationInformationDto.java @@ -202,6 +202,8 @@ public record ApplicationInformationDto( /** * Default constructor for JAXB. + * Creates an ApplicationInformationDto with all fields set to null. + * The canonical constructor with all fields is automatically provided by the record declaration. */ public ApplicationInformationDto() { this(null, null, null, null, null, null, null, null, null, @@ -211,17 +213,6 @@ public ApplicationInformationDto() { null); } - /** - * Constructor for basic application information (minimum required fields). - */ - public ApplicationInformationDto(String dataCustodianId, String clientId, String clientSecret, String clientName) { - this(null, dataCustodianId, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, null, - clientSecret, null, clientName, null, null, clientId, null, null, - null, null, null, null, null, null, null, null, null, - null, null); - } - // JAXB property accessors - must match propOrder sequence @XmlElement(name = "dataCustodianId", namespace = "http://naesb.org/espi")