[CUBBY-250] バリデーション実行時の null チェック間違い Created: 18/Aug/09  Updated: 02/Sep/09  Resolved: 24/Aug/09

Status: Closed
Project: Cubby
Component/s: Core
Affects Version/s: 1.1.6
Fix Version/s: 1.1.7

Type: Bug Priority: Major
Reporter: baba Assignee: baba
Resolution: Fixed Votes: 0
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 で判定するべき



 Comments   
Comment by baba [ 24/Aug/09 ]

動作に影響のない不要な条件なので削除します。

Generated at Wed Aug 21 12:04:31 JST 2019 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.