On Tue, 3 Jun 2025 16:35:01 GMT, Weijun Wang <wei...@openjdk.org> wrote:
> I’m just not sure if we’ll end up changing the rule again in the future. > Hardcoding the system property name makes me a bit uneasy, and the default > fallback being hardcoded as well adds to that concern. Thanks so much for the review @wangweij. What would be your preference? 1. Leave things as is 2. Add an internal method to create stdin-aware `Scanner`/`InputStreamReader` (If this is your preference, any hints on which class I shall use? Shall I create a new `src/java.base/share/classes/jdk/internal/io/StdinAware.java`? Something else?) 3. Add a test utility method to create stdin-aware `Scanner`/`InputStreamReader` 4. Something else ------------- PR Comment: https://git.openjdk.org/jdk/pull/25544#issuecomment-2936772995