Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Properties#store(OutputStream) doesn't flush the output to the OutputStream #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gastaldi opened this issue Jul 8, 2024 · 0 comments · Fixed by #24
Closed

Properties#store(OutputStream) doesn't flush the output to the OutputStream #23

gastaldi opened this issue Jul 8, 2024 · 0 comments · Fixed by #24

Comments

@gastaldi
Copy link
Contributor

gastaldi commented Jul 8, 2024

The following test fails:

    @Test
    void testStoreOutputStream() throws IOException, URISyntaxException {
        Path f = getResource("/test.properties");
        Properties p = Properties.loadProperties(f);
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        p.store(os);
        assertThat(os.toString()).isEqualTo(readAll(f));
    }

Probably the OutputStreamWriter isn't flushing to the underlying OutputStream?

@gastaldi gastaldi changed the title Properties#store(OutputStream) doesn't write to the OutputStream Properties#store(OutputStream) doesn't flush the output to the OutputStream Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant