RFR: 8372950: Pem.pemEncoded should cache the Pattern
Anthony Scarpino
ascarpino at openjdk.org
Wed Dec 24 18:49:59 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.
Please note that if you do not integrate this change before the new year, you will need to change the copyright to 2026.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28661#issuecomment-3690372700
More information about the security-dev
mailing list