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

allow to write to PathURLConnection #160

Closed
wants to merge 1 commit into from
Closed

Conversation

jsnps
Copy link

@jsnps jsnps commented Jun 28, 2021

Hey,
we needed the ability to write to the PathURLConnection of jimfs for unit testing. The suggested change allowed us to use jimfs in the context of EMF (Eclipse Modeling Framework).
We are not sure about the contract of getOutputStream, but for usual sockets there seems to be one stream, which will be reused for subsequent calls to getOutputStream (e.g. AbstractPlainSocketImpl).
A "try with resource" usage of the stream, would then close the stream and the next call to getOutputStream would return the closed stream. In our case this was not relevant and it is aligned with the getInputStream behavior.
We have not opened the stream in the connect method, but only on demand in the getOutputStream method.

It would be good, if this functionality (or enhanced implementation) could be added to the library.

Thanks
Janik

@google-cla
Copy link

google-cla bot commented Jun 28, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Jun 28, 2021
@netdpb
Copy link
Member

netdpb commented Jun 28, 2021

Hi. It might be helpful to open an issue requesting this feature before creating a pull request, so we can discuss your requirements before thinking about the implementation.

@netdpb netdpb added P3 type=enhancement Make an existing feature better labels Jun 30, 2021
@cpovirk
Copy link
Member

cpovirk commented Jan 4, 2022

Belatedly: Thanks. I'm going to close this PR, with the understanding that we could come back to, depending on how the discussion in #161 goes. But mainly I'm doing it because I'm making a pass through PRs that don't have the CLA signed, since we don't want to merge one by mistake.

@cpovirk cpovirk closed this Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: no P3 type=enhancement Make an existing feature better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants