File tree Expand file tree Collapse 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 Expand file tree Collapse file tree 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) {
115115 throw new UncheckedIOException (ex );
116116 }
117117 }
118- // https://github.com/spring-projects/spring-boot/issues/44502
119118 else if (value instanceof Path p ) {
120119 writeString (p .toString ());
121120 }
Original file line number Diff line number Diff line change @@ -241,16 +241,14 @@ void endWhenNotStartedThrowsException() {
241241 .isThrownBy (() -> valueWriter .end (Series .ARRAY )));
242242 }
243243
244- // https://github.com/spring-projects/spring-boot/issues/44502
245- @ Test
244+ @ Test // gh-44502
246245 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 " ));
248247 }
249248
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" ));
254252 }
255253
256254 private <V > String write (V value ) {
You can’t perform that action at this time.
0 commit comments