Description
Statement being argument does not play with utility methods, where we expect the argument to be present. The vast majority of statements are required to have an argument, but there a few (like input/output) which do not.
When @Nullable annotation comes into play this creates a rather nice conundrum in DeclaredStatement.findFirstDeclaredSubstatementArgument() – we really want to allow only searching for statements which have an argument, otherwise the optional could be interpreted in differing ways.
We either capture the non-null of argument in an intermediate interface, or move the method completely into a sub-interface. This may be sticky as the class hierarchy will get more complicated, hence this should be part of the next release.
Attachments
Issue Links
- is blocked by
-
YANGTOOLS-912 {Input,Output}Statement definition violates ModelStatement API contract
-
- Resolved
-
- relates to
-
YANGTOOLS-907 Get rid of javax.annotation nullness annotations
-
- Resolved
-
- split to
-
YANGTOOLS-1220 Switch non-existent arguments to Empty instead of Void
-
- Resolved
-