RFR: 8358319: Pem.decode should cache the Pattern

Anthony Scarpino ascarpino at openjdk.org
Mon Jun 2 16:57:56 UTC 2025


On Mon, 2 Jun 2025 11:10:04 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> SonarCloud complains we are using the String.replaceAll() method that creates Pattern internally every time. This looks a minor inefficiency in preview feature, but we can fix it from the day 1. Also fixed the variable name style in adjacent cached Pattern.
> 
> Additional testing:
>  - [x] Linux x86_64 server fastdebug, `jdk_security`

looks good

-------------

Marked as reviewed by ascarpino (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25583#pullrequestreview-2889246606


More information about the security-dev mailing list