Deprecate getSemanticVersion() for removal
[yangtools.git] / model / yang-model-ri / src / main / java / org / opendaylight / yangtools / yang / model / ri / stmt / impl / eff / ImportEffectiveStatementImpl.java
index b898eaada10c0acbf63ffa40736c739d0eba5a11..0a0818b75fffc2e928704e5ff4d531b993ab331c 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.yangtools.yang.model.ri.stmt.impl.eff;
 
-import com.google.common.base.MoreObjects;
 import com.google.common.collect.ImmutableList;
 import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
@@ -32,8 +31,8 @@ public final class ImportEffectiveStatementImpl extends WithSubstatements<String
             final ImmutableList<? extends EffectiveStatement<?, ?>> substatements,
             final @NonNull SourceIdentifier importedSource) {
         super(declared, substatements);
-        this.revision = importedSource.getRevision().orElse(null);
-        this.semVer = importedSource instanceof SemVerSourceIdentifier
+        revision = importedSource.getRevision().orElse(null);
+        semVer = importedSource instanceof SemVerSourceIdentifier
             ? ((SemVerSourceIdentifier) importedSource).getSemanticVersion().orElse(null)
                 : null;
     }
@@ -44,6 +43,7 @@ public final class ImportEffectiveStatementImpl extends WithSubstatements<String
     }
 
     @Override
+    @Deprecated(since = "8.0.4", forRemoval = true)
     public Optional<SemVer> getSemanticVersion() {
         return Optional.ofNullable(semVer);
     }
@@ -57,16 +57,4 @@ public final class ImportEffectiveStatementImpl extends WithSubstatements<String
     public ImportEffectiveStatement asEffectiveStatement() {
         return this;
     }
-
-    @Override
-    public String toString() {
-        return MoreObjects.toStringHelper(this).omitNullValues()
-                .add("moduleName", getModuleName())
-                .add("revision", revision)
-                .add("version", semVer)
-                .add("prefix", getPrefix())
-                .add("description", getDescription().orElse(null))
-                .add("reference", getReference().orElse(null))
-                .toString();
-    }
 }