From c6bbca468071df29cba43bb3a9f692ac4ed270fc Mon Sep 17 00:00:00 2001 From: Martin Ciglan Date: Fri, 27 Jan 2017 12:59:41 +0100 Subject: [PATCH] SourceIdentifier.create() method deprecation explained - javadoc - imports optimized Change-Id: I3dfc20fd23a57051784a691875bce0260af39a5e Signed-off-by: Martin Ciglan (cherry picked from commit 3c372c27fe31696e35d03361b6476b0ccd035d77) --- .../yang/model/repo/api/SourceIdentifier.java | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SourceIdentifier.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SourceIdentifier.java index fdd0ca0caa..d7143c3c9f 100644 --- a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SourceIdentifier.java +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SourceIdentifier.java @@ -15,8 +15,7 @@ import com.google.common.collect.Interners; import java.util.regex.Pattern; import org.opendaylight.yangtools.concepts.Identifier; import org.opendaylight.yangtools.concepts.Immutable; -import org.opendaylight.yangtools.objcache.ObjectCache; -import org.opendaylight.yangtools.objcache.ObjectCacheFactory; +import org.opendaylight.yangtools.concepts.SemVer; import org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil; /** @@ -120,6 +119,34 @@ public abstract class SourceIdentifier implements Identifier, Immutable { return revision; } + /** + *

+ * Since we've got two ways of model versioning (revision & semantic version), + * this method shouldn't be called directly anymore. Eventually, callers of this method + * should be notified before method gets deleted. + * @deprecated use either + *

+ * or + * + * + * @param moduleName + * Name of schema + + * @param revision + * Revision of source in format YYYY-mm-dd. If not present, + * default value will be used. + * + * @return particular SourceIdentifier instance + * + */ @Deprecated public static SourceIdentifier create(final String moduleName, final Optional revision) { return new RevisionSourceIdentifier(moduleName, revision); -- 2.36.6