aboutsummaryrefslogtreecommitdiffstats
path: root/config/src/main/java
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@gmail.com>2022-09-02 16:12:23 +0200
committerGitHub <noreply@github.com>2022-09-02 16:12:23 +0200
commit3edb00aee148bed53e74fb324fe46960acdbd498 (patch)
tree79c1ce4524eacdf4117a0908f5f55d8358b836ae /config/src/main/java
parentc23bba0b2cd6ab7699ee2b0d6be34c023159ffb8 (diff)
Revert "Cleanup, more tests and separate resolved from not"
Diffstat (limited to 'config/src/main/java')
-rw-r--r--config/src/main/java/com/yahoo/vespa/config/ConfigPayloadApplier.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/config/src/main/java/com/yahoo/vespa/config/ConfigPayloadApplier.java b/config/src/main/java/com/yahoo/vespa/config/ConfigPayloadApplier.java
index 4f078059f46..b0ce2291438 100644
--- a/config/src/main/java/com/yahoo/vespa/config/ConfigPayloadApplier.java
+++ b/config/src/main/java/com/yahoo/vespa/config/ConfigPayloadApplier.java
@@ -250,12 +250,10 @@ public class ConfigPayloadApplier<T extends ConfigInstance.Builder> {
private ModelReference resolveModel(String modelStringValue) {
var model = ModelReference.valueOf(modelStringValue);
// Resolve any of url and path present, in priority order
- if (model.url().isPresent() && canResolveUrls()) {
- model = new ModelReference(Path.of(resolveUrl(model.url().get().value()).value()));
- }
- else if (model.path().isPresent()) {
- model = new ModelReference(Path.of(resolvePath(model.path().get().value()).value()));
- }
+ if (model.url().isPresent() && canResolveUrls())
+ model = model.withUrl(Optional.of(resolveUrl(model.url().get().value())));
+ else if (model.path().isPresent())
+ model = model.withPath(Optional.of(resolvePath(model.path().get().value())));
return model;
}