diff options
author | Jon Bratseth <bratseth@gmail.com> | 2022-11-08 11:11:11 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2022-11-08 11:11:11 +0100 |
commit | 5046ad6259251bdaa5b03fb9cb367306150e2153 (patch) | |
tree | 13a6a7c4277fc7ec58b3825a56e95094d48d5a63 /config/src | |
parent | 45000a2bf0f388d768c4791b3d06ff007096579a (diff) |
Tolerate attempts to resolve multiple times
Diffstat (limited to 'config/src')
-rw-r--r-- | config/src/main/java/com/yahoo/vespa/config/ConfigPayloadApplier.java | 8 |
1 files changed, 5 insertions, 3 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 6beb11cf8fa..b50c38792c1 100644 --- a/config/src/main/java/com/yahoo/vespa/config/ConfigPayloadApplier.java +++ b/config/src/main/java/com/yahoo/vespa/config/ConfigPayloadApplier.java @@ -249,10 +249,12 @@ public class ConfigPayloadApplier<T extends ConfigInstance.Builder> { private ModelReference resolveModel(String modelStringValue) { var model = ModelReference.valueOf(modelStringValue); + if (model.isResolved()) + return model; if (model.url().isPresent() && canResolveUrls()) // url has priority - model = ModelReference.resolved(Path.of(resolveUrl(model.url().get().value()).value())); - else if (model.path().isPresent()) - model = ModelReference.resolved(Path.of(resolvePath(model.path().get().value()).value())); + return ModelReference.resolved(Path.of(resolveUrl(model.url().get().value()).value())); + if (model.path().isPresent()) + return ModelReference.resolved(Path.of(resolvePath(model.path().get().value()).value())); return model; } |