-
Type:
Enhancement
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: 26
-
Component/s: security-libs
-
Fix Understood
we are using the String.replaceAll() method that creates Pattern internally every time:
/**
* Construct a String-based encoding based off the type. leadingData
* is not used with this method.
* @return PEM in a string
*/
public static String pemEncoded(PEM pem) {
String p = pem.content().replaceAll("(.{64})", "$1\r\n");
return pemEncoded(pem.type(), p);
}
We already have cached Patterns for other cases, we should do the same here.
/**
* Construct a String-based encoding based off the type. leadingData
* is not used with this method.
* @return PEM in a string
*/
public static String pemEncoded(PEM pem) {
String p = pem.content().replaceAll("(.{64})", "$1\r\n");
return pemEncoded(pem.type(), p);
}
We already have cached Patterns for other cases, we should do the same here.
- links to
-
Review(master)
openjdk/jdk/28661