yasson
yasson copied to clipboard
Regression: yasson on SpringBoot: IOException Stream Closed
Describe the bug It seems there is a regression on the following issue https://github.com/eclipse-ee4j/yasson/issues/389. I originally reported the issue here https://github.com/spring-projects/spring-boot/issues/35651.
To Reproduce
FileWriter writer = new FileWriter("output.json");
Jsonb jsonb = JsonbBuilder.create();
jsonb.toJson(Collections.singletonMap("a", "alpha"), writer);
jsonb.toJson(Collections.singletonMap("a", "alpha"), writer);
Expected behavior
toJson
not closing the writer.
System information:
- OS: Windows
- Java Version: 17
- Yasson Version: 3.0.3
Additional context This issue seems to be introduced with version 3.0.3. Version 3.0.2 and below work as expected.