Skip to content

Commit ae85938

Browse files
fix: format changes for jdk 17 pipeline
1 parent 2db92ee commit ae85938

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/com/spotify/github/v3/clients/PKCS1PEMKey.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,18 @@ public static Optional<KeySpec> loadKeySpec(final byte[] privateKey) {
7373
* @param isPKCS1 whether this is PKCS1 format (needs conversion to PKCS8)
7474
* @return an Optional containing the KeySpec if successful
7575
*/
76-
private static Optional<KeySpec> extractKeySpec(String base64Content, boolean isPKCS1) {
76+
private static Optional<KeySpec> extractKeySpec(final String base64Content, final boolean isPKCS1) {
7777
try {
7878
// Remove all whitespace
79-
base64Content = base64Content.replaceAll("\\s+", "");
79+
String sanitizedContent = base64Content.replaceAll("\\s+", "");
8080

8181
// Check if content is empty after whitespace removal
82-
if (base64Content.isEmpty()) {
82+
if (sanitizedContent.isEmpty()) {
8383
return Optional.empty();
8484
}
8585

8686
// Decode the base64 content
87-
byte[] decodedKey = Base64.getDecoder().decode(base64Content);
87+
byte[] decodedKey = Base64.getDecoder().decode(sanitizedContent);
8888

8989
// Convert to PKCS8 if necessary
9090
byte[] pkcs8Key = isPKCS1 ? toPkcs8(decodedKey) : decodedKey;

0 commit comments

Comments
 (0)