From: artemgavrilov (@artemgavrilov) <noreply+artemgavrilov@github.com>
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Subject: Re: [pgjdbc/pgjdbc] PR #4251: OAuth implementation
Date: Tue, 14 Jul 2026 13:48:42 +0000
Message-ID: <gh-pgjdbc-pgjdbc-4251-rc3579524743@github.com> (raw)
In-Reply-To: <gh-pgjdbc-pgjdbc-4251-rc3577778258@github.com>
References: <gh-pgjdbc-pgjdbc-4251@github.com>
<gh-pgjdbc-pgjdbc-4251-rc3577778258@github.com>
(on pgjdbc/src/main/java/org/postgresql/core/v3/OAuthAuthenticator.java:196)
`msg.put` accepts `byte[]` while `token` is `char[]`. This code intends to avoid any token copies left in memory as was requested in previous review round. So this loop is easiest way to make conversion without leaving any copies.