Skip to content

Commit 4202553

Browse files
committed
Merge branch '6.0.x'
2 parents 834d22f + f07b9fd commit 4202553

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

spring-core/src/main/java/org/springframework/core/io/PathResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ public boolean equals(@Nullable Object obj) {
303303
}
304304

305305
/**
306-
* This implementation returns the hash code of the underlying Path reference.
306+
* This implementation returns the hash code of the underlying {@link Path} reference.
307307
*/
308308
@Override
309309
public int hashCode() {

spring-core/src/test/java/org/springframework/util/ObjectUtilsTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -937,10 +937,10 @@ void nullSafeConciseToStringForUUID() {
937937

938938
@Test
939939
void nullSafeConciseToStringForFile() {
940-
String path = "/tmp/file.txt";
940+
String path = "/tmp/file.txt".replace('/', File.separatorChar);
941941
assertThat(ObjectUtils.nullSafeConciseToString(new File(path))).isEqualTo(path);
942942

943-
path = "/tmp/" + "xyz".repeat(32);
943+
path = ("/tmp/" + "xyz".repeat(32)).replace('/', File.separatorChar);
944944
assertThat(ObjectUtils.nullSafeConciseToString(new File(path)))
945945
.hasSize(truncatedLength)
946946
.startsWith(path.subSequence(0, 100))
@@ -949,10 +949,10 @@ void nullSafeConciseToStringForFile() {
949949

950950
@Test
951951
void nullSafeConciseToStringForPath() {
952-
String path = "/tmp/file.txt";
952+
String path = "/tmp/file.txt".replace('/', File.separatorChar);
953953
assertThat(ObjectUtils.nullSafeConciseToString(Path.of(path))).isEqualTo(path);
954954

955-
path = "/tmp/" + "xyz".repeat(32);
955+
path = ("/tmp/" + "xyz".repeat(32)).replace('/', File.separatorChar);
956956
assertThat(ObjectUtils.nullSafeConciseToString(Path.of(path)))
957957
.hasSize(truncatedLength)
958958
.startsWith(path.subSequence(0, 100))

0 commit comments

Comments
 (0)