Convert DeviceInfo and DeviceInfoList to a record

This commit is contained in:
Jon Chambers authored and Chris Eager committed 2023-08-22 16:31:02 -05:00
1 parent a96ee57c7e
commit 8b13826949
2 files changed
+2 -31

No files matched your search

@@ -5,25 +5,5 @@
package org.whispersystems.textsecuregcm.entities;
import com.fasterxml.jackson.annotation.JsonProperty;
public class DeviceInfo {
@JsonProperty
private long id;
@JsonProperty
private String name;
@JsonProperty
private long lastSeen;
@JsonProperty
private long created;
public DeviceInfo(long id, String name, long lastSeen, long created) {
this.id = id;
this.name = name;
this.lastSeen = lastSeen;
this.created = created;
}
public record DeviceInfo(long id, String name, long lastSeen, long created) {
}
@@ -5,16 +5,7 @@
package org.whispersystems.textsecuregcm.entities;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
public class DeviceInfoList {
@JsonProperty
private List<DeviceInfo> devices;
public DeviceInfoList(List<DeviceInfo> devices) {
this.devices = devices;
}
public record DeviceInfoList(List<DeviceInfo> devices) {
}