diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-12-02 22:48:21 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-12-02 22:48:21 +0100 |
commit | fcf664e1a6bb9890bd54ff4f8b78497236152bf2 (patch) | |
tree | fff1df3e68101edc3d3d3b98b5eb51b7758c209c | |
parent | c0a2a4c5b8c595b3f523026a9684d505cabedf05 (diff) |
Care must be taken with maps and tests.
2 files changed, 7 insertions, 6 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/entity/MemoryEntityService.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/entity/MemoryEntityService.java index ae71c5893e8..a33ef135adf 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/entity/MemoryEntityService.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/entity/MemoryEntityService.java @@ -1,6 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.controller.api.integration.entity; +import com.google.common.collect.ImmutableMap; import com.yahoo.vespa.hosted.controller.api.identifiers.Property; import com.yahoo.vespa.hosted.controller.api.identifiers.PropertyId; @@ -18,8 +19,8 @@ public class MemoryEntityService implements EntityService { @Override public Map<PropertyId, Property> listProperties() { - return Map.of(new PropertyId("1234"), new Property("foo"), - new PropertyId("4321"), new Property("bar")); + return ImmutableMap.of(new PropertyId("1234"), new Property("foo"), + new PropertyId("4321"), new Property("bar")); } @Override diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/athenz/responses/property-list.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/athenz/responses/property-list.json index 2913769999d..2931fc8b162 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/athenz/responses/property-list.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/athenz/responses/property-list.json @@ -1,12 +1,12 @@ { "properties": [ { - "propertyid": "4321", - "property": "bar" - }, - { "propertyid": "1234", "property": "foo" + }, + { + "propertyid": "4321", + "property": "bar" } ] } |