Details

    • Sub-task
    • Status: Resolved
    • High
    • Resolution: Done
    • None
    • 8.0.0
    • model-api, model-ri, parser
    • None

    Description

      ModelStatement.statementSource() is a confusing contract, as it allows for DeclaredStatements which are not StatementOrigin.DECLARATION. A DeclaredStatement is by definition declared, so this does not quite make sense.

      Based on historical record, the interface design comes from 2015 (Java 7). In Java 8 world, though, and thus have a consistent way of saying that:

      • DeclaredStatement is always StatementOrigin.DECLARATION
      • EffectiveStatement is either one of the possibilities based on getDeclared() being null (or not)

      Remove all ModelStatement.statementSource() implementations in favor of default implementations in DeclaredStatement and EffectiveStatement.

      Attachments

        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: