Message-ID: From: "reda-alaoui (@reda-alaoui)" To: "pgjdbc/pgjdbc" Date: Mon, 16 Mar 2026 08:53:56 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #3964: Allow setting of KeepAlive options in JDBC driver In-Reply-To: References: List-Id: X-GitHub-Author-Login: reda-alaoui X-GitHub-Comment-Id: 2938959655 X-GitHub-Comment-Type: review_comment X-GitHub-Commit: 113b0e34eefce6a93fae808d61b06a97ad0c6272 X-GitHub-Issue: 3964 X-GitHub-Line: 89 X-GitHub-Path: pgjdbc/src/main/java11/org/postgresql/core/ExtendedSocketOptionAccessorImpl.java X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: review_comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3964#discussion_r2938959655 Content-Type: text/plain; charset=utf-8 (on pgjdbc/src/main/java11/org/postgresql/core/ExtendedSocketOptionAccessorImpl.java:89) That's what I wanted to do first. But https://github.com/policeman-tools/forbidden-apis made the build fail when I tried. That's because components of root package `jdk` are not guaranteed to be available in every JDK. See https://docs.oracle.com/en/java/javase/11/docs/api/index.html about JDK: > The Java Development Kit (JDK) APIs are specific to the JDK and will not necessarily be available in all implementations of the Java SE Platform. Therefore, unless you want to relax the constraint, I think reflection is needed.