File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
main/java/org/springframework/core/io
test/java/org/springframework/util Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -303,7 +303,7 @@ public boolean equals(@Nullable Object obj) {
303
303
}
304
304
305
305
/**
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.
307
307
*/
308
308
@ Override
309
309
public int hashCode () {
Original file line number Diff line number Diff line change @@ -937,10 +937,10 @@ void nullSafeConciseToStringForUUID() {
937
937
938
938
@ Test
939
939
void nullSafeConciseToStringForFile () {
940
- String path = "/tmp/file.txt" ;
940
+ String path = "/tmp/file.txt" . replace ( '/' , File . separatorChar ) ;
941
941
assertThat (ObjectUtils .nullSafeConciseToString (new File (path ))).isEqualTo (path );
942
942
943
- path = "/tmp/" + "xyz" .repeat (32 );
943
+ path = ( "/tmp/" + "xyz" .repeat (32 )). replace ( '/' , File . separatorChar );
944
944
assertThat (ObjectUtils .nullSafeConciseToString (new File (path )))
945
945
.hasSize (truncatedLength )
946
946
.startsWith (path .subSequence (0 , 100 ))
@@ -949,10 +949,10 @@ void nullSafeConciseToStringForFile() {
949
949
950
950
@ Test
951
951
void nullSafeConciseToStringForPath () {
952
- String path = "/tmp/file.txt" ;
952
+ String path = "/tmp/file.txt" . replace ( '/' , File . separatorChar ) ;
953
953
assertThat (ObjectUtils .nullSafeConciseToString (Path .of (path ))).isEqualTo (path );
954
954
955
- path = "/tmp/" + "xyz" .repeat (32 );
955
+ path = ( "/tmp/" + "xyz" .repeat (32 )). replace ( '/' , File . separatorChar );
956
956
assertThat (ObjectUtils .nullSafeConciseToString (Path .of (path )))
957
957
.hasSize (truncatedLength )
958
958
.startsWith (path .subSequence (0 , 100 ))
You can’t perform that action at this time.
0 commit comments