Skip to content

Commit 957c403

Browse files
authored
refactor: remove minimum required fields constructor from ApplicationInformationDto (#43)
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
1 parent d5e321b commit 957c403

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

openespi-common/src/main/java/org/greenbuttonalliance/espi/common/dto/usage/ApplicationInformationDto.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ public record ApplicationInformationDto(
202202

203203
/**
204204
* Default constructor for JAXB.
205+
* Creates an ApplicationInformationDto with all fields set to null.
206+
* The canonical constructor with all fields is automatically provided by the record declaration.
205207
*/
206208
public ApplicationInformationDto() {
207209
this(null, null, null, null, null, null, null, null, null,
@@ -211,17 +213,6 @@ public ApplicationInformationDto() {
211213
null);
212214
}
213215

214-
/**
215-
* Constructor for basic application information (minimum required fields).
216-
*/
217-
public ApplicationInformationDto(String dataCustodianId, String clientId, String clientSecret, String clientName) {
218-
this(null, dataCustodianId, null, null, null, null, null, null, null,
219-
null, null, null, null, null, null, null, null, null,
220-
clientSecret, null, clientName, null, null, clientId, null, null,
221-
null, null, null, null, null, null, null, null, null,
222-
null, null);
223-
}
224-
225216
// JAXB property accessors - must match propOrder sequence
226217

227218
@XmlElement(name = "dataCustodianId", namespace = "http://naesb.org/espi")

0 commit comments

Comments
 (0)