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

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

XMLWordPrintable

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major Major
    • 1.1.7
    • Affects Version/s: 1.1.6
    • Component/s: Core
    • None

      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 で判定するべき

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

              Created:
              Updated:
              Resolved: