QName.withModule() has been deprecated, migrate to using
AbstractQName.bindTo().
Change-Id: I95aa618ce0f8a0ad4844e99db03f373e9e4ea884
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
be164e2db35c7d7a7a1f2234b847402d6b9e2827)
}
} else {
// We are looking for instantiation via uses in other module
}
} else {
// We are looking for instantiation via uses in other module
- final QName instantiedName = origDef.getQName().withModule(namespace());
+ final QName instantiedName = origDef.getQName().bindTo(namespace());
final DataSchemaNode potential = getSchema().getDataChildByName(instantiedName);
// We check if it is really instantiated from same
// definition as class was derived
final DataSchemaNode potential = getSchema().getDataChildByName(instantiedName);
// We check if it is really instantiated from same
// definition as class was derived
InstanceIdentifier.builder(Cont.class).child(ContAug.class, GrpCont.class).build());
assertEquals(YangInstanceIdentifier.create(NodeIdentifier.create(Cont.QNAME),
NodeIdentifier.create(ContChoice.QNAME),
InstanceIdentifier.builder(Cont.class).child(ContAug.class, GrpCont.class).build());
assertEquals(YangInstanceIdentifier.create(NodeIdentifier.create(Cont.QNAME),
NodeIdentifier.create(ContChoice.QNAME),
- NodeIdentifier.create(GrpCont.QNAME.withModule(ContAug.QNAME.getModule()))), contAug);
+ NodeIdentifier.create(GrpCont.QNAME.bindTo(ContAug.QNAME.getModule()))), contAug);
// Legacy: downcast the child to Class, losing type safety but still working. Faced with ambiguity, it will
// select the lexically-lower class
// Legacy: downcast the child to Class, losing type safety but still working. Faced with ambiguity, it will
// select the lexically-lower class
final YangInstanceIdentifier rootAug = codecContext.toYangInstanceIdentifier(
InstanceIdentifier.builder(RootAug.class, GrpCont.class).build());
assertEquals(YangInstanceIdentifier.create(NodeIdentifier.create(Root.QNAME),
final YangInstanceIdentifier rootAug = codecContext.toYangInstanceIdentifier(
InstanceIdentifier.builder(RootAug.class, GrpCont.class).build());
assertEquals(YangInstanceIdentifier.create(NodeIdentifier.create(Root.QNAME),
- NodeIdentifier.create(GrpCont.QNAME.withModule(RootAug.QNAME.getModule()))), rootAug);
+ NodeIdentifier.create(GrpCont.QNAME.bindTo(RootAug.QNAME.getModule()))), rootAug);
final InstanceIdentifier<?> contAug = codecContext.fromYangInstanceIdentifier(
YangInstanceIdentifier.create(NodeIdentifier.create(Cont.QNAME), NodeIdentifier.create(ContChoice.QNAME),
final InstanceIdentifier<?> contAug = codecContext.fromYangInstanceIdentifier(
YangInstanceIdentifier.create(NodeIdentifier.create(Cont.QNAME), NodeIdentifier.create(ContChoice.QNAME),
- NodeIdentifier.create(GrpCont.QNAME.withModule(ContAug.QNAME.getModule()))));
+ NodeIdentifier.create(GrpCont.QNAME.bindTo(ContAug.QNAME.getModule()))));
assertEquals(InstanceIdentifier.builder(Cont.class).child(ContAug.class, GrpCont.class).build(), contAug);
final InstanceIdentifier<?> rootBase = codecContext.fromYangInstanceIdentifier(
assertEquals(InstanceIdentifier.builder(Cont.class).child(ContAug.class, GrpCont.class).build(), contAug);
final InstanceIdentifier<?> rootBase = codecContext.fromYangInstanceIdentifier(
final InstanceIdentifier<?> rootAug = codecContext.fromYangInstanceIdentifier(
YangInstanceIdentifier.create(NodeIdentifier.create(Root.QNAME),
final InstanceIdentifier<?> rootAug = codecContext.fromYangInstanceIdentifier(
YangInstanceIdentifier.create(NodeIdentifier.create(Root.QNAME),
- NodeIdentifier.create(GrpCont.QNAME.withModule(RootAug.QNAME.getModule()))));
+ NodeIdentifier.create(GrpCont.QNAME.bindTo(RootAug.QNAME.getModule()))));
assertEquals(InstanceIdentifier.builder(RootAug.class, GrpCont.class).build(), rootAug);
}
}
assertEquals(InstanceIdentifier.builder(RootAug.class, GrpCont.class).build(), rootAug);
}
}