* Returns semantic version of module.
*
* @return semantic version
+ * @deprecated Semantic versioning is deprecated
*/
+ @Deprecated(since = "8.0.4", forRemoval = true)
public Optional<SemVer> getSemanticVersion() {
return Optional.ofNullable(semVer);
}
static String safeStringArgument(final SourceIdentifier source, final IRStatement stmt, final String desc) {
final StatementSourceReference ref = getReference(source, stmt);
final IRArgument arg = stmt.argument();
- checkArgument(arg != null, "Missing %s at %s", desc, ref);
+ if (arg == null) {
+ throw new IllegalArgumentException("Missing " + desc + " at " + ref);
+ }
+
// TODO: we probably need to understand yang version first....
return ArgumentContextUtils.rfc6020().stringFromStringContext(arg, ref);
}
}
@Override
+ @Deprecated(forRemoval = true)
public Optional<SemVer> getSemanticVersion() {
return Optional.ofNullable(semVer);
}
@Override
public String getPrefix() {
- return null;
+ throw new UnsupportedOperationException();
}
@Override