Details
-
Improvement
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
None
-
Operating System: Mac OS
Platform: PC
Description
Seeing a problem with generated code in the affinity yang file.
The compiler errors is:
[ERROR] /Users/sraman/affinity/affinity/yang/target/generated-sources/sal/org/opendaylight/yang/gen/v1/urn/opendaylight/affinity/rev130916/CreateAffinityGroupInputBuilder.java:[54,19] error: CreateAffinityGroupInputImpl is not abstract and does not override abstract method getAffinityIdentifier() in AffinityGroup
[ERROR] /Users/sraman/affinity/affinity/yang/target/generated-sources/sal/org/opendaylight/yang/gen/v1/urn/opendaylight/affinity/rev130916/CreateAffinityGroupInputBuilder.java:[66,8] error: method does not override or implement a method from a supertype
(1) The first error may be due to incorrect order of following blocks of code.
(2) There seems to be an issue with the @Override directive at line 66. This is the getAffinityIdentifers() method.
Affinity-topology-all.yang is checked into the affinity repo.
====
public CreateAffinityGroupInput build()
private static class CreateAffinityGroupInputImpl implements CreateAffinityGroupInput {
private final List<AffinityIdentifiers> _affinityIdentifiers;
private final String _id;
private Map<Class<? extends Augmentation<CreateAffinityGroupInput>>, Augmentation<CreateAffinityGroupInput>> augmentation = new HashMap<>();
private CreateAffinityGroupInputImpl(CreateAffinityGroupInputBuilder builder)
{ this._affinityIdentifiers = builder.getAffinityIdentifiers(); this._id = builder.getId(); this.augmentation.putAll(builder.augmentation); } @Override
public List<AffinityIdentifiers> getAffinityIdentifiers()
@Override
public String getId()
@SuppressWarnings("unchecked")
@Override
public <E extends Augmentation<CreateAffinityGroupInput>> E getAugmentation(Class<E> augmentationType) {
if (augmentationType == null)
return (E) augmentation.get(augmentationType);
}
}