RFR: 8358319: Pem.decode should cache the Pattern

Anthony Scarpino ascarpino at openjdk.org
Mon Jun 2 18:08:51 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`

Tests passed

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

PR Comment: https://git.openjdk.org/jdk/pull/25583#issuecomment-2931861062


More information about the security-dev mailing list