Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-908

DeclaredStatement.argument() nullness is ambiguous

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Medium
    • Resolution: Done
    • None
    • 5.0.0
    • parser
    • None

    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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              rovarga Robert Varga
              rovarga Robert Varga
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: