We have a few constructs which provide bridging to SchemaPath, which
are now triggering warnings. Deprecate them, so that we suppress
warnings and give users some time to adjust.
Change-Id: I4cdfd47cceacceca27e6a155a87999c97ea7a490
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
import org.opendaylight.yangtools.concepts.Immutable;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.concepts.Immutable;
import org.opendaylight.yangtools.yang.common.QName;
+@Deprecated(since = "7.0.9", forRemoval = true)
final class PathFromRoot extends AbstractList<QName> implements Immutable {
private static final QName[] EMPTY_QNAMES = new QName[0];
private static final VarHandle QNAMES;
final class PathFromRoot extends AbstractList<QName> implements Immutable {
private static final QName[] EMPTY_QNAMES = new QName[0];
private static final VarHandle QNAMES;
+ @Deprecated(since = "7.0.9", forRemoval = true)
final SchemaPath implicitSchemaPathParent() {
return SchemaPath.ROOT;
}
final SchemaPath implicitSchemaPathParent() {
return SchemaPath.ROOT;
}
+ @Deprecated(since = "7.0.9", forRemoval = true)
final SchemaPath implicitSchemaPathParent() {
return SchemaPath.SAME;
}
final SchemaPath implicitSchemaPathParent() {
return SchemaPath.SAME;
}
+ @Deprecated(since = "7.0.9", forRemoval = true)
private static final AtomicReferenceFieldUpdater<SchemaNodeIdentifier, SchemaPath> SCHEMAPATH_UPDATER =
AtomicReferenceFieldUpdater.newUpdater(SchemaNodeIdentifier.class, SchemaPath.class, "schemaPath");
// Cached SchemaPath.
private static final AtomicReferenceFieldUpdater<SchemaNodeIdentifier, SchemaPath> SCHEMAPATH_UPDATER =
AtomicReferenceFieldUpdater.newUpdater(SchemaNodeIdentifier.class, SchemaPath.class, "schemaPath");
// Cached SchemaPath.
+ @Deprecated(since = "7.0.9", forRemoval = true)
private volatile SchemaPath schemaPath;
// Cached hashCode
private volatile int hash;
private volatile SchemaPath schemaPath;
// Cached hashCode
private volatile int hash;
* Create the {@link SchemaPath} equivalent of this identifier.
*
* @return SchemaPath equivalent.
* Create the {@link SchemaPath} equivalent of this identifier.
*
* @return SchemaPath equivalent.
+ * @deprecated This method is scheduled for removal along with {@link SchemaPath}.
+ @Deprecated(since = "7.0.9", forRemoval = true)
public final @NonNull SchemaPath asSchemaPath() {
final SchemaPath ret = schemaPath;
return ret != null ? ret : loadSchemaPath();
public final @NonNull SchemaPath asSchemaPath() {
final SchemaPath ret = schemaPath;
return ret != null ? ret : loadSchemaPath();
return MoreObjects.toStringHelper(className()).add("qnames", toStringQNames()).toString();
}
return MoreObjects.toStringHelper(className()).add("qnames", toStringQNames()).toString();
}
+ @Deprecated(since = "7.0.9", forRemoval = true)
abstract @NonNull SchemaPath implicitSchemaPathParent();
abstract @NonNull Object pathObject();
abstract @NonNull String className();
abstract @NonNull SchemaPath implicitSchemaPathParent();
abstract @NonNull Object pathObject();
abstract @NonNull String className();
+ @Deprecated(since = "7.0.9", forRemoval = true)
private @NonNull SchemaPath loadSchemaPath() {
final SchemaPath newPath = implicitSchemaPathParent().createChild(getNodeIdentifiers());
return SCHEMAPATH_UPDATER.compareAndSet(this, null, newPath) ? newPath : schemaPath;
private @NonNull SchemaPath loadSchemaPath() {
final SchemaPath newPath = implicitSchemaPathParent().createChild(getNodeIdentifiers());
return SCHEMAPATH_UPDATER.compareAndSet(this, null, newPath) ? newPath : schemaPath;