[YANGTOOLS-912] {Input,Output}Statement definition violates ModelStatement API contract Created: 23/Oct/18  Updated: 08/Jul/21  Resolved: 08/Jul/21

Status: Resolved
Project: yangtools
Component/s: parser
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: High
Reporter: Robert Varga Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks YANGTOOLS-908 DeclaredStatement.argument() nullness... Resolved
is blocked by YANGTOOLS-1066 SchemaPath identification of SchemaNo... Resolved

 Description   

The declaration

InputStatement extends DeclaredStatement<QName>

violates API contract of ModelStatement around argument type, which is:

 * @param <A> Argument type ({@link Void} if statement does not have argument.)


 Comments   
Comment by Robert Varga [ 23/Oct/18 ]

Neither input nor output take an argument, hence they should be DeclaredStatement<Void> instead.

Comment by Robert Varga [ 24/Oct/18 ]

This went in https://git.opendaylight.org/gerrit/#/c/18038/12/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/stmt/InputStatement.java . Rectifying this will be a major undertaking, as there are interface changes required to support the difference.

Comment by Robert Varga [ 08/Jul/21 ]

Current design is forced on us by input/output being schema tree statements, hence they inherently have an implied QName argument.

Generated at Wed Feb 07 20:54:39 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.