Merge branch '6.0.x'
This commit is contained in:
commit
420255373d
|
@ -303,7 +303,7 @@ public class PathResource extends AbstractResource implements WritableResource {
|
|||
}
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
|
|
|
@ -937,10 +937,10 @@ class ObjectUtilsTests {
|
|||
|
||||
@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))
|
||||
|
@ -949,10 +949,10 @@ class ObjectUtilsTests {
|
|||
|
||||
@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))
|
||||
|
|
Loading…
Reference in New Issue