From 9e56c38b7ac49a87330581336bb36910416fbed5 Mon Sep 17 00:00:00 2001 From: Christian Dupuis Date: Tue, 13 May 2014 17:43:28 +0200 Subject: [PATCH] Rename DefaulErrorAttributes to DefaultErrorAttributes fixes #853 --- .../boot/actuate/trace/WebRequestTraceFilterTests.java | 6 +++--- ...faulErrorAttributes.java => DefaultErrorAttributes.java} | 4 ++-- .../boot/autoconfigure/web/ErrorAttributes.java | 2 +- .../boot/autoconfigure/web/ErrorMvcAutoConfiguration.java | 4 ++-- .../boot/autoconfigure/web/DefaultErrorAttributesTests.java | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) rename spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/{DefaulErrorAttributes.java => DefaultErrorAttributes.java} (97%) diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/trace/WebRequestTraceFilterTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/trace/WebRequestTraceFilterTests.java index 5901151134..24c0b05f35 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/trace/WebRequestTraceFilterTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/trace/WebRequestTraceFilterTests.java @@ -19,7 +19,7 @@ package org.springframework.boot.actuate.trace; import java.util.Map; import org.junit.Test; -import org.springframework.boot.autoconfigure.web.DefaulErrorAttributes; +import org.springframework.boot.autoconfigure.web.DefaultErrorAttributes; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; @@ -27,7 +27,7 @@ import static org.junit.Assert.assertEquals; /** * Tests for {@link WebRequestTraceFilter}. - * + * * @author Dave Syer */ public class WebRequestTraceFilterTests { @@ -76,7 +76,7 @@ public class WebRequestTraceFilterTests { @Test public void filterHasError() { - this.filter.setErrorAttributes(new DefaulErrorAttributes()); + this.filter.setErrorAttributes(new DefaultErrorAttributes()); MockHttpServletRequest request = new MockHttpServletRequest("GET", "/foo"); MockHttpServletResponse response = new MockHttpServletResponse(); response.setStatus(500); diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/DefaulErrorAttributes.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/DefaultErrorAttributes.java similarity index 97% rename from spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/DefaulErrorAttributes.java rename to spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/DefaultErrorAttributes.java index b6589a841e..b9a82831cc 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/DefaulErrorAttributes.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/DefaultErrorAttributes.java @@ -55,10 +55,10 @@ import org.springframework.web.servlet.ModelAndView; * @see ErrorAttributes */ @Order(Ordered.HIGHEST_PRECEDENCE) -public class DefaulErrorAttributes implements ErrorAttributes, HandlerExceptionResolver, +public class DefaultErrorAttributes implements ErrorAttributes, HandlerExceptionResolver, Ordered { - private static final String ERROR_ATTRIBUTE = DefaulErrorAttributes.class.getName() + private static final String ERROR_ATTRIBUTE = DefaultErrorAttributes.class.getName() + ".ERROR"; @Override diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ErrorAttributes.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ErrorAttributes.java index b94e95ca77..66f699bf7c 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ErrorAttributes.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ErrorAttributes.java @@ -27,7 +27,7 @@ import org.springframework.web.servlet.ModelAndView; * * @author Phillip Webb * @since 1.1.0 - * @see DefaulErrorAttributes + * @see DefaultErrorAttributes */ public interface ErrorAttributes { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration.java index 3fb34a5589..eecdc646e5 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration.java @@ -74,8 +74,8 @@ public class ErrorMvcAutoConfiguration implements EmbeddedServletContainerCustom @Bean @ConditionalOnMissingBean(value = ErrorAttributes.class, search = SearchStrategy.CURRENT) - public DefaulErrorAttributes errorAttributes() { - return new DefaulErrorAttributes(); + public DefaultErrorAttributes errorAttributes() { + return new DefaultErrorAttributes(); } @Bean diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/DefaultErrorAttributesTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/DefaultErrorAttributesTests.java index f6de308ed6..b2e1c78267 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/DefaultErrorAttributesTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/DefaultErrorAttributesTests.java @@ -41,13 +41,13 @@ import static org.hamcrest.Matchers.startsWith; import static org.junit.Assert.assertThat; /** - * Tests for {@link DefaulErrorAttributes}. + * Tests for {@link DefaultErrorAttributes}. * * @author Phillip Webb */ public class DefaultErrorAttributesTests { - private DefaulErrorAttributes errorAttributes = new DefaulErrorAttributes(); + private DefaultErrorAttributes errorAttributes = new DefaultErrorAttributes(); private MockHttpServletRequest request = new MockHttpServletRequest();