Skip to content

Commit a13f240

Browse files
authored
Merge pull request #256 from IABTechLab/tjm-UID2-705-check-duplicate-enclave-id
Added Json properties ot EnclaveIdentifier constructor
2 parents 64afde3 + 04a3990 commit a13f240

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/main/java/com/uid2/shared/model/EnclaveIdentifier.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package com.uid2.shared.model;
22

3+
import com.fasterxml.jackson.annotation.JsonCreator;
4+
import com.fasterxml.jackson.annotation.JsonProperty;
5+
36
import java.util.Objects;
47

58
public class EnclaveIdentifier {
@@ -8,7 +11,13 @@ public class EnclaveIdentifier {
811
private final String identifier;
912
private final long created;
1013

11-
public EnclaveIdentifier(String name, String protocol, String identifier, long created) {
14+
@JsonCreator
15+
public EnclaveIdentifier(
16+
@JsonProperty("name") String name,
17+
@JsonProperty("protocol") String protocol,
18+
@JsonProperty("identifier") String identifier,
19+
@JsonProperty("created") long created
20+
) {
1221
this.name = name;
1322
this.protocol = protocol;
1423
this.identifier = identifier;

0 commit comments

Comments
 (0)