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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.6
    • Fix Version/s: 1.1.7
    • Component/s: Core
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: