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

Improve trust between DefaultSchemaTreeInference and SchemaInferenceStack

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • High
    • Resolution: Done
    • None
    • 8.0.3, 7.0.16
    • model-spi, model-util

    Description

      DefaultSchemaTreeInference does not trust its callers and SchemaInferenceStack re-validates SchemaTreeInference arguments. This is nice from defensiveness perspective, but both of these classes are providing guarantees of well-formedness.

      We can save significant amounts of work if these classes co-operate is some sort of fashion. This probably entails an DefaultSchemaTreeInference.unsafeOf(), with explicit warnings et al. If we go that route, also add a runtime knob (based on a system property) to cause unsafeOf() to treat the input as unsafe and validate it.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: