From 287520a810e64e78cec9cbd6d0e419654c517225 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Thu, 23 Mar 2017 09:49:54 +0900 Subject: [PATCH] Polish Closes gh-8698 --- .../web/servlet/error/DefaultErrorViewIntegrationTests.java | 2 +- .../java/org/springframework/boot/env/OriginTrackedValue.java | 2 +- .../springframework/boot/env/TextResourcePropertyOrigin.java | 2 +- .../boot/env/TextResourcePropertyOriginTests.java | 3 +++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewIntegrationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewIntegrationTests.java index 042fb38b8b3..3609bc4a60a 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewIntegrationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/DefaultErrorViewIntegrationTests.java @@ -49,7 +49,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; /** - * Itegration tests for the default error view. + * Integration tests for the default error view. * * @author Dave Syer */ diff --git a/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedValue.java b/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedValue.java index 36f7fd8cd42..cfa9a867b8f 100644 --- a/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedValue.java +++ b/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedValue.java @@ -65,7 +65,7 @@ class OriginTrackedValue { * the resulting {@link OriginTrackedValue}. * @param value the source value * @param origin the origin - * @return a {@link OriginTrackedValue} or {@code null} if the source value was + * @return an {@link OriginTrackedValue} or {@code null} if the source value was * {@code null}. */ public static OriginTrackedValue of(Object value, PropertyOrigin origin) { diff --git a/spring-boot/src/main/java/org/springframework/boot/env/TextResourcePropertyOrigin.java b/spring-boot/src/main/java/org/springframework/boot/env/TextResourcePropertyOrigin.java index dbe4246f1fc..e5884294819 100644 --- a/spring-boot/src/main/java/org/springframework/boot/env/TextResourcePropertyOrigin.java +++ b/spring-boot/src/main/java/org/springframework/boot/env/TextResourcePropertyOrigin.java @@ -40,7 +40,7 @@ public class TextResourcePropertyOrigin implements PropertyOrigin { /** * Return the resource where the property originated. - * @return the resource the text resource or {@code null} + * @return the text resource or {@code null} */ public Resource getResource() { return this.resource; diff --git a/spring-boot/src/test/java/org/springframework/boot/env/TextResourcePropertyOriginTests.java b/spring-boot/src/test/java/org/springframework/boot/env/TextResourcePropertyOriginTests.java index 3750847359a..92f6543c65e 100644 --- a/spring-boot/src/test/java/org/springframework/boot/env/TextResourcePropertyOriginTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/env/TextResourcePropertyOriginTests.java @@ -109,6 +109,7 @@ public class TextResourcePropertyOriginTests { Location location3 = new Location(2, 2); assertThat(location1.hashCode()).isEqualTo(location1.hashCode()); assertThat(location1.hashCode()).isEqualTo(location2.hashCode()); + assertThat(location1.hashCode()).isNotEqualTo(location3.hashCode()); assertThat(location1).isEqualTo(location1); assertThat(location1).isEqualTo(location2); assertThat(location1).isNotEqualTo(location3); @@ -126,6 +127,8 @@ public class TextResourcePropertyOriginTests { new ClassPathResource("foo2.txt"), new Location(1, 2)); assertThat(origin1.hashCode()).isEqualTo(origin1.hashCode()); assertThat(origin1.hashCode()).isEqualTo(origin2.hashCode()); + assertThat(origin1.hashCode()).isNotEqualTo(origin3.hashCode()); + assertThat(origin1.hashCode()).isNotEqualTo(origin4.hashCode()); assertThat(origin1).isEqualTo(origin1); assertThat(origin1).isEqualTo(origin2); assertThat(origin1).isNotEqualTo(origin3);