diff --git a/src/controller/java/src/chip/devicecontroller/model/AttributeState.java b/src/controller/java/src/chip/devicecontroller/model/AttributeState.java index db7eefc21b878d..2489dcd52f167f 100644 --- a/src/controller/java/src/chip/devicecontroller/model/AttributeState.java +++ b/src/controller/java/src/chip/devicecontroller/model/AttributeState.java @@ -25,8 +25,8 @@ public final class AttributeState { private static final String TAG = "AttributeState"; - private Object valueObject; - private byte[] tlv; + private final Object valueObject; + private final byte[] tlv; private JSONObject json; public AttributeState(Object valueObject, byte[] tlv, String jsonString) { diff --git a/src/controller/java/src/chip/devicecontroller/model/ChipEventPath.java b/src/controller/java/src/chip/devicecontroller/model/ChipEventPath.java index f3798cc826047c..2f70a97f81d614 100644 --- a/src/controller/java/src/chip/devicecontroller/model/ChipEventPath.java +++ b/src/controller/java/src/chip/devicecontroller/model/ChipEventPath.java @@ -22,8 +22,8 @@ /** An event path that should be used for requests. */ public class ChipEventPath { - private ChipPathId endpointId, clusterId, eventId; - private boolean isUrgent; + private final ChipPathId endpointId, clusterId, eventId; + private final boolean isUrgent; private ChipEventPath( ChipPathId endpointId, ChipPathId clusterId, ChipPathId eventId, boolean isUrgent) { diff --git a/src/controller/java/src/chip/devicecontroller/model/ChipPathId.java b/src/controller/java/src/chip/devicecontroller/model/ChipPathId.java index ec88838c9ede30..31511d7eda462b 100644 --- a/src/controller/java/src/chip/devicecontroller/model/ChipPathId.java +++ b/src/controller/java/src/chip/devicecontroller/model/ChipPathId.java @@ -21,8 +21,8 @@ /** Class representing a potentially wildcard identifier for endpoints/clusters/attributes. */ public class ChipPathId { - private long id; - private IdType type; + private final long id; + private final IdType type; public enum IdType { // Enum names are read by JNI code. diff --git a/src/controller/java/src/chip/devicecontroller/model/EventState.java b/src/controller/java/src/chip/devicecontroller/model/EventState.java index 72b14c1391dc93..705f453d70c197 100644 --- a/src/controller/java/src/chip/devicecontroller/model/EventState.java +++ b/src/controller/java/src/chip/devicecontroller/model/EventState.java @@ -27,13 +27,13 @@ public final class EventState { public static final int MILLIS_SINCE_EPOCH = 1; private static final String TAG = "EventState"; - private long eventNumber; - private int priorityLevel; - private int timestampType; - private long timestampValue; + private final long eventNumber; + private final int priorityLevel; + private final int timestampType; + private final long timestampValue; - private Object valueObject; - private byte[] tlv; + private final Object valueObject; + private final byte[] tlv; private JSONObject json; public EventState(