]> nmode's Git Repositories - signal-cli/commitdiff
Make fields final for DBusSignal classes
authorAsamK <asamk@gmx.de>
Thu, 14 May 2020 21:44:24 +0000 (23:44 +0200)
committerAsamK <asamk@gmx.de>
Thu, 14 May 2020 21:44:24 +0000 (23:44 +0200)
src/main/java/org/asamk/Signal.java

index 654f365f2de0768dc6187cdf3f39c1ef5aa3fdab..d56dbc9c2be1c34978b2990fd074c8cc7057bd02 100644 (file)
@@ -41,11 +41,11 @@ public interface Signal extends DBusInterface {
 
     class MessageReceived extends DBusSignal {
 
-        private long timestamp;
-        private String sender;
-        private byte[] groupId;
-        private String message;
-        private List<String> attachments;
+        private final long timestamp;
+        private final String sender;
+        private final byte[] groupId;
+        private final String message;
+        private final List<String> attachments;
 
         public MessageReceived(String objectpath, long timestamp, String sender, byte[] groupId, String message, List<String> attachments) throws DBusException {
             super(objectpath, timestamp, sender, groupId, message, attachments);
@@ -79,8 +79,8 @@ public interface Signal extends DBusInterface {
 
     class ReceiptReceived extends DBusSignal {
 
-        private long timestamp;
-        private String sender;
+        private final long timestamp;
+        private final String sender;
 
         public ReceiptReceived(String objectpath, long timestamp, String sender) throws DBusException {
             super(objectpath, timestamp, sender);
@@ -99,12 +99,12 @@ public interface Signal extends DBusInterface {
 
     class SyncMessageReceived extends DBusSignal {
 
-        private long timestamp;
-        private String source;
-        private String destination;
-        private byte[] groupId;
-        private String message;
-        private List<String> attachments;
+        private final long timestamp;
+        private final String source;
+        private final String destination;
+        private final byte[] groupId;
+        private final String message;
+        private final List<String> attachments;
 
         public SyncMessageReceived(String objectpath, long timestamp, String source, String destination, byte[] groupId, String message, List<String> attachments) throws DBusException {
             super(objectpath, timestamp, source, destination, groupId, message, attachments);