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

`FileUtils` is indeed a better class name.

> 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

Well, `Files.newBufferedReader` does have `Buffered` in the name. I just thought having `.newBufferedInputStream` would would convey the intent.

>The exclusions list references an imaginary `Unsafe.class` file. Should I replace that with the new file?

Let's replace it indeed.

> Should test code be excluded or updated to use the new util?

AFAIK there are two instances, and they are worth updating:

> `new StrangeInputStream(seed, new FileInputStream("target/buffer.txt"));`

It is fine to convert to a new util method. It looks like a true case when the necessary buffering was missing.

> `new BufferedReader(new InputStreamReader(new FileInputStream(path)));`

It could rather be `Files.newBufferedReader(...)` instead


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