diff options
author | Jon Bratseth <bratseth@gmail.com> | 2022-09-02 22:03:18 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2022-09-02 22:03:18 +0200 |
commit | f519dbc42c68770bfbcff7d11cede53b11ad1751 (patch) | |
tree | 3a43b0d1d09052936497e0f7627ee13941db4e14 /config/src/main | |
parent | 3072a5dcb6d68db03e31503ebcbf01d7dcce1d95 (diff) |
Revert "Merge pull request #23910 from vespa-engine/revert-23907-bratseth/model-reference-cleanup"
This reverts commit 37f0d3a64511b0dd0d902053be3a6cffc21acee6, reversing
changes made to c23bba0b2cd6ab7699ee2b0d6be34c023159ffb8.
Diffstat (limited to 'config/src/main')
-rw-r--r-- | config/src/main/java/com/yahoo/vespa/config/ConfigPayloadApplier.java | 10 |
1 files changed, 6 insertions, 4 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 b0ce2291438..4f078059f46 100644 --- a/config/src/main/java/com/yahoo/vespa/config/ConfigPayloadApplier.java +++ b/config/src/main/java/com/yahoo/vespa/config/ConfigPayloadApplier.java @@ -250,10 +250,12 @@ 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 = model.withUrl(Optional.of(resolveUrl(model.url().get().value()))); - else if (model.path().isPresent()) - model = model.withPath(Optional.of(resolvePath(model.path().get().value()))); + 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())); + } return model; } |