Skip to content
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

PropertyListParser.parse(InputStream) closes InputStream for TYPE_XML #55

Closed
kaibolay opened this issue Jan 28, 2020 · 0 comments
Closed
Assignees
Labels

Comments

@kaibolay
Copy link

The method PropertyListParser.parse(InputStream) is documented as

Parses a property list from an InputStream. This method does not close the specified input stream.

Unfortunately the underlying Xerxes XML parser does close the InputStream.

As a workaround I wrap the InputStream to ignore close():

      PropertyListParser.parse(
          new FilterInputStream(inputStream) {
            @Override public void close() {}
          });

I see two ways to fix this bug:

  1. Update the documentation to point out that the InputStream might be closed.
  2. Update the implementation to wrap the InputStream to ignore close().
@3breadt 3breadt self-assigned this Feb 27, 2020
@3breadt 3breadt added the bug label Feb 27, 2020
@3breadt 3breadt closed this as completed May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants