Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-1769

DomainRootDefinition.RolloutPlanValidator is throwing OFE when it should just be an assert

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 3.0.0.Alpha8
    • None
    • Management
    • None

    Description

      The ParameterValidator javadoc declares the 'value' parameter cannot be null, so a null param value should result in an AssertionError or an IAE. But RolloutPlanValidator is throwing an OFE. OFE should be used for user errors (i.e. invalid requests), not coding mistakes. The data passed to a validator is not under the control of the user; passing a null means a coding mistake.

      The caller of a ParameterValidator is the kernel, not outside code, so we are not validating unknown inputs. So an assert is fine; no need for an IAE.

      Attachments

        Activity

          People

            bstansbe@redhat.com Brian Stansberry
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: