Skip to content

Commit

Permalink
Merge branch '6.0.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Jul 4, 2023
2 parents 834d22f + f07b9fd commit 4202553
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public boolean equals(@Nullable Object obj) {
}

/**
* This implementation returns the hash code of the underlying Path reference.
* This implementation returns the hash code of the underlying {@link Path} reference.
*/
@Override
public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -937,10 +937,10 @@ void nullSafeConciseToStringForUUID() {

@Test
void nullSafeConciseToStringForFile() {
String path = "/tmp/file.txt";
String path = "/tmp/file.txt".replace('/', File.separatorChar);
assertThat(ObjectUtils.nullSafeConciseToString(new File(path))).isEqualTo(path);

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

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

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

0 comments on commit 4202553

Please sign in to comment.