RFR: 8358319: Pem.decode should cache the Pattern

Aleksey Shipilev shade at openjdk.org
Mon Jun 2 18:18:52 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`

Thanks! I'll integrate once my day starts tomorrow.

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

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


More information about the security-dev mailing list