Skip to content

Commit 3e080c5

Browse files
committed
Avoid NPE on null secret key
1 parent efba9e8 commit 3e080c5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/checkout/AbstractStaticKeysSdkCredentials.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.checkout;
22

3+
import com.checkout.common.CheckoutUtils;
4+
35
abstract class AbstractStaticKeysSdkCredentials extends SdkCredentials {
46

57
protected final String secretKey;
@@ -18,6 +20,7 @@ protected AbstractStaticKeysSdkCredentials(final PlatformType platformType,
1820
}
1921

2022
protected void validateSecretKey(final String secretKey, final String secretKeyPattern) {
23+
CheckoutUtils.validateParams("secretKey", secretKey);
2124
if (validKey(secretKey, secretKeyPattern)) {
2225
return;
2326
}

0 commit comments

Comments
 (0)