diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-12-01 07:35:14 -0800 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-12-01 07:35:14 -0800 |
commit | 051c699dee05fc0a2f5e9a83ddd49016114d8bfb (patch) | |
tree | a94c05da756ff987d198a8bea2b9bf5149771546 /config-model-api/src/main/java/com/yahoo/config/model/api/ModelFactory.java | |
parent | c0513ac34d2c438e9f97e699659855029e1f06e8 (diff) |
Deprecate com.yahoo.config.provision.Version
We have com.yahoo.component.Version, and one is enough.
Diffstat (limited to 'config-model-api/src/main/java/com/yahoo/config/model/api/ModelFactory.java')
-rw-r--r-- | config-model-api/src/main/java/com/yahoo/config/model/api/ModelFactory.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/ModelFactory.java b/config-model-api/src/main/java/com/yahoo/config/model/api/ModelFactory.java index b2d9244cc9d..23782162725 100644 --- a/config-model-api/src/main/java/com/yahoo/config/model/api/ModelFactory.java +++ b/config-model-api/src/main/java/com/yahoo/config/model/api/ModelFactory.java @@ -1,7 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.config.model.api; -import com.yahoo.config.provision.Version; +import com.yahoo.component.Version; /** * Factory for config models. @@ -13,7 +13,14 @@ public interface ModelFactory { * * @return the version of a {@link Model} instance that this factory can create. */ - Version getVersion(); + @SuppressWarnings("deprecation") + default Version version() { // TODO: Remove this default implementationm after December 2018 + return getVersion().toVersion(); + } + + /** @deprecated use and override version(). TODO: Remove this method after December 2018 */ + @Deprecated + default com.yahoo.config.provision.Version getVersion() { return com.yahoo.config.provision.Version.from(version()); } /** * Creates an instance of a {@link Model}. The resulting instance will be used to serve config. No model @@ -34,4 +41,5 @@ public interface ModelFactory { * @return a {@link ModelCreateResult} instance. */ ModelCreateResult createAndValidateModel(ModelContext modelContext, ValidationParameters validationParameters); + } |