diff options
author | Øyvind Grønnesby <oyving@verizonmedia.com> | 2019-05-31 09:53:23 +0200 |
---|---|---|
committer | Øyvind Grønnesby <oyving@verizonmedia.com> | 2019-05-31 09:53:23 +0200 |
commit | c27d7f4211e6d2357f649323b0c0dba8a7c79ad6 (patch) | |
tree | 9ec521cc7d1befb5d5502d8751b51736f43b32c7 /controller-server | |
parent | b4c7bc329f5400e241daf625f9926dd4c89705fb (diff) |
Make rotations list in Application immutable
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/Application.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/Application.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/Application.java index 1bae9e0ccd4..d989a9dfbe6 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/Application.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/Application.java @@ -99,7 +99,7 @@ public class Application { this.majorVersion = Objects.requireNonNull(majorVersion, "majorVersion cannot be null"); this.metrics = Objects.requireNonNull(metrics, "metrics cannot be null"); this.pemDeployKey = pemDeployKey; - this.rotations = Objects.requireNonNull(rotations, "rotations cannot be null"); + this.rotations = List.copyOf(Objects.requireNonNull(rotations, "rotations cannot be null")); this.rotationStatus = ImmutableMap.copyOf(Objects.requireNonNull(rotationStatus, "rotationStatus cannot be null")); } @@ -197,7 +197,7 @@ public class Application { /** Returns the global rotation id of this, if present */ public List<RotationId> rotations() { - return Collections.unmodifiableList(rotations); + return rotations; } /** Returns the default global endpoints for this in given system */ |