Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-4218

Throw exception for ValidationService.getValidationModel(...) if invalid validation model is found

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Validation 1.0.0
    • Validation 1.0.0
    • Validation
    • None

    Description

      Currently ValidationService.getValidationModel(...) always returns null either if there is no validation model found for the given resource type or the one being found is invalid.
      To be able to distinguish those cases and also to ease fixing of invalid validation models I propose that this method is allowed to throw IllegalStateException's in case the matching validation model is invalid (i.e. if it contains an invalid Validator or does not have at least properties subnode or children subnode being set).
      That should of course be explicitly stated in the Javadoc.

      Attachments

        Activity

          People

            kwin Konrad Windszus
            kwin Konrad Windszus
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: