From: vlsi (@vlsi) <noreply+vlsi@github.com>
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Subject: Re: [pgjdbc/pgjdbc] PR #4512: fix: mask credentials in the JDBC URLs the driver logs
Date: Thu, 05 Nov 2026 12:10:27 +0000
Message-ID: <gh-pgjdbc-pgjdbc-4512-rc4480244906@github.com> (raw)
In-Reply-To: <gh-pgjdbc-pgjdbc-4512@github.com>
References: <gh-pgjdbc-pgjdbc-4512@github.com>
(on pgjdbc/src/main/java/org/postgresql/PGProperty.java:1036)
**minor**: the Javadoc of `isSensitive()` does not say what "sensitive" means
It is new public API, and the summary and `@return` repeat each other. Please state the contract, for example:
```java
/**
* Returns whether the value of this parameter is a secret, such as a password or the passphrase of a key.
* The driver replaces the value of such a parameter with {@code ***} where it logs a JDBC URL or puts one
* in an exception message.
*
* @return {@code true} if the value of this parameter must not be disclosed
*/
```
The same applies to `These parameters should not be disclosed.` on `SENSITIVE_PROPERTIES`, and to `maskSensitiveValues`, whose Javadoc does not say that only the query string after the first `?` is changed and that parameter names match exactly.