Extract ProblemCollector interface

This commit is contained in:
Chris Beams
2011-02-08 19:07:03 +00:00
parent 60414c9052
commit a2bc381ade
11 changed files with 55 additions and 19 deletions

View File

@@ -15,7 +15,7 @@
*/
package org.springframework.web.servlet.config;
import org.springframework.beans.factory.parsing.SimpleProblemCollector;
import org.springframework.beans.factory.parsing.ProblemCollector;
import org.springframework.beans.factory.support.ManagedList;
import org.springframework.context.config.AbstractFeatureSpecification;
import org.springframework.context.config.FeatureSpecificationExecutor;
@@ -243,7 +243,7 @@ public final class MvcAnnotationDriven extends AbstractFeatureSpecification {
}
@Override
protected void doValidate(SimpleProblemCollector reporter) {
protected void doValidate(ProblemCollector problems) {
}
}

View File

@@ -15,7 +15,7 @@
*/
package org.springframework.web.servlet.config;
import org.springframework.beans.factory.parsing.SimpleProblemCollector;
import org.springframework.beans.factory.parsing.ProblemCollector;
import org.springframework.context.config.AbstractFeatureSpecification;
import org.springframework.context.config.FeatureSpecificationExecutor;
import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
@@ -78,7 +78,7 @@ public class MvcDefaultServletHandler extends AbstractFeatureSpecification {
}
@Override
protected void doValidate(SimpleProblemCollector reporter) {
protected void doValidate(ProblemCollector problems) {
}
}

View File

@@ -16,7 +16,7 @@
package org.springframework.web.servlet.config;
import org.springframework.beans.factory.parsing.SimpleProblemCollector;
import org.springframework.beans.factory.parsing.ProblemCollector;
import org.springframework.context.config.AbstractFeatureSpecification;
import org.springframework.context.config.FeatureSpecificationExecutor;
import org.springframework.core.Ordered;
@@ -167,7 +167,7 @@ public final class MvcResources extends AbstractFeatureSpecification {
}
@Override
protected void doValidate(SimpleProblemCollector problems) {
protected void doValidate(ProblemCollector problems) {
if (!StringUtils.hasText(mapping)) {
problems.error("Mapping is required");
}

View File

@@ -19,7 +19,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.springframework.beans.factory.parsing.SimpleProblemCollector;
import org.springframework.beans.factory.parsing.ProblemCollector;
import org.springframework.context.config.AbstractFeatureSpecification;
import org.springframework.context.config.FeatureSpecificationExecutor;
import org.springframework.util.StringUtils;
@@ -72,7 +72,7 @@ public final class MvcViewControllers extends AbstractFeatureSpecification {
}
@Override
protected void doValidate(SimpleProblemCollector problems) {
protected void doValidate(ProblemCollector problems) {
if (mappings.size() == 0) {
problems.error("At least one ViewController must be defined");
}