Merge pull request #8698 from izeye:polish-20160323

* pr/8698:
  Polish
This commit is contained in:
Stephane Nicoll
2017-03-28 10:09:23 +02:00
4 changed files with 6 additions and 3 deletions

View File

@@ -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
*/

View File

@@ -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) {

View File

@@ -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;

View File

@@ -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);