Uploaded image for project: 'Cubby'
  1. Cubby
  2. CUBBY-250

バリデーション実行時の null チェック間違い

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.6
    • 1.1.7
    • Core
    • None

    Description

      https://www.seasar.org/svn/cubby/branches/1.1.x/cubby-project/cubby/src/main/java/org/seasar/cubby/validator/impl/ValidationProcessorImpl.java

      	public void validate(final ValidationRules validationRules,
      			final ValidationPhase validationPhase,
      			final Map<String, Object[]> params, final Object form,
      			final ActionErrors errors) {
      		final Collection<ValidationRule> phaseValidationRules = validationRules
      				.getPhaseValidationRules(validationPhase);
      		if (validationRules != null) {
      			for (final ValidationRule validationRule : phaseValidationRules) {
      				validationRule.apply(params, form, errors);
      			}
      			if (!errors.isEmpty()) {
      				throw new ValidationException();
      			}
      		}
      	}
      

      validationRules != null と判定するのではなく phaseValidationRules で判定するべき

      Attachments

        Activity

          People

            baba baba
            baba baba
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: