Skip to content

Regression: yasson on SpringBoot: IOException Stream Closed #604

@IndyNaessens

Description

@IndyNaessens

Describe the bug
It seems there is a regression on the following issue #389. I originally reported the issue here spring-projects/spring-boot#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions