pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: jgardn3r (@jgardn3r) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] PR #3750: Use `BufferedInputStream` with `FileInputStream`
Date: Thu, 07 Aug 2025 02:13:20 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

> @jgardn3r , would you be open to update the PR as per [#3750 (comment)](https://github.com/pgjdbc/pgjdbc/pull/3750#issuecomment-3160666440) ?

Happy to make the changes.

A few things that I have thought while implementing these changes:
* I'm not a huge fan of the signature `IoUtils.newBufferedInputStream(File)` (because, of course, naming is hard)
   * I think if I were naming it, I would call it `FileUtils.newInputStream(File)` similar to that of the `Files.newInputStream()`
   The reason being: if you are always going to expect file streams to be buffered, then there is no real point to put it in the name. If you want a file stream, it will be buffered, whether you like it or not.
   * There are many uses where the argument is a `String`, so I would add an overload for that
* The exclusions list references an imaginary `Unsafe.class` file. Should I replace that with the new file?
* Should test code be excluded or updated to use the new util?

What do you guys think?

view thread (8+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] PR #3750: Use `BufferedInputStream` with `FileInputStream`
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox