File tree 2 files changed +5
-8
lines changed
spring-boot-project/spring-boot/src
main/java/org/springframework/boot/json
test/java/org/springframework/boot/json
2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,6 @@ else if (value instanceof WritableJson writableJson) {
115
115
throw new UncheckedIOException (ex );
116
116
}
117
117
}
118
- // https://github.com/spring-projects/spring-boot/issues/44502
119
118
else if (value instanceof Path p ) {
120
119
writeString (p .toString ());
121
120
}
Original file line number Diff line number Diff line change @@ -241,16 +241,14 @@ void endWhenNotStartedThrowsException() {
241
241
.isThrownBy (() -> valueWriter .end (Series .ARRAY )));
242
242
}
243
243
244
- // https://github.com/spring-projects/spring-boot/issues/44502
245
- @ Test
244
+ @ Test // gh-44502
246
245
void writeJavaNioPathWhenSingleElementShouldBeSerializedAsString () {
247
- assertThat (doWrite ((valueWriter ) -> valueWriter .write (Path .of ("overflow " )))).isEqualTo (quoted ("overflow " ));
246
+ assertThat (doWrite ((valueWriter ) -> valueWriter .write (Path .of ("a " )))).isEqualTo (quoted ("a " ));
248
247
}
249
248
250
- @ Test
251
- void writeJavaNioPathShouldShouldBeSerializedAsString () {
252
- assertThat (doWrite ((valueWriter ) -> valueWriter .write (Path .of ("stack/overflow/error" ))))
253
- .isEqualTo (quoted ("stack\\ /overflow\\ /error" ));
249
+ @ Test // gh-44502
250
+ void writeJavaNioPathShouldBeSerializedAsString () {
251
+ assertThat (doWrite ((valueWriter ) -> valueWriter .write (Path .of ("a/b/c" )))).isEqualTo (quoted ("a\\ /b\\ /c" ));
254
252
}
255
253
256
254
private <V > String write (V value ) {
You can’t perform that action at this time.
0 commit comments