RFR: 8372950: Pem.pemEncoded should cache the Pattern
Anthony Scarpino
ascarpino at openjdk.org
Mon Dec 22 22:32:06 UTC 2025
On Thu, 4 Dec 2025 17:13:13 GMT, Fernando Guallini <fguallini at openjdk.org> wrote:
> PEM is using the String.replaceAll() method that creates a Pattern internally every time. This looks like a minor inefficiency and since it is caching Patterns for other cases, it should do the same here.
Sorry for the delay, I just noticed your PR. I have tested the changes and reviewed the code.
-------------
Marked as reviewed by ascarpino (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/28661#pullrequestreview-3605964192
More information about the security-dev
mailing list