summaryrefslogtreecommitdiff
path: root/app/src/main/java/se
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2024-06-26 16:45:43 +0200
committercyBerta <cyberta@riseup.net>2024-06-26 16:45:43 +0200
commitd2b2fc3b1b6c4d723ba112e911bfc972ea6aa3e6 (patch)
tree4f6d38aea33b2109cd659fe999755f5a26400745 /app/src/main/java/se
parent54d1329bcfe7f9c197396ff0015d79b10c4cb6fe (diff)
make a couple of member variables of model classes final, since they are not changed after initialization
Diffstat (limited to 'app/src/main/java/se')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/models/Transport.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/models/Transport.java b/app/src/main/java/se/leap/bitmaskclient/base/models/Transport.java
index 33fbbf7a..c2590012 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/models/Transport.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/models/Transport.java
@@ -14,18 +14,18 @@ import java.io.Serializable;
import de.blinkt.openvpn.core.connection.Connection;
public class Transport implements Serializable {
- private String type;
- private String[] protocols;
+ private final String type;
+ private final String[] protocols;
@Nullable
- private String[] ports;
+ private final String[] ports;
@Nullable
- private Options options;
+ private final Options options;
public Transport(String type, String[] protocols, String[] ports, String cert) {
this(type, protocols, ports, new Options(cert, "0"));
}
- public Transport(String type, String[] protocols, String[] ports, Options options) {
+ public Transport(String type, String[] protocols, @Nullable String[] ports, @Nullable Options options) {
this.type = type;
this.protocols = protocols;
this.ports = ports;
@@ -69,9 +69,9 @@ public class Transport implements Serializable {
public static class Options implements Serializable {
@Nullable
- private String cert;
+ private final String cert;
@SerializedName("iatMode")
- private String iatMode;
+ private final String iatMode;
@Nullable
private Endpoint[] endpoints;
@@ -136,8 +136,8 @@ public class Transport implements Serializable {
public static class Endpoint implements Serializable {
- private String ip;
- private String cert;
+ private final String ip;
+ private final String cert;
public Endpoint(String ip, String cert) {
this.ip = ip;