Skip to content

Commit 2b18ee6

Browse files
committed
Add null check to namedGroups property
1 parent 3b839ae commit 2b18ee6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bedrock/bedrock-common/src/main/java/com/nukkitx/protocol/bedrock/util/EncryptionUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class EncryptionUtils {
4343
// DO NOT REMOVE THIS
4444
// Since Java 8u231, secp384r1 is deprecated and will throw an exception.
4545
String namedGroups = System.getProperty("jdk.tls.namedGroups");
46-
System.setProperty("jdk.tls.namedGroups", namedGroups.isEmpty() ? "secp384r1" : ", secp384r1");
46+
System.setProperty("jdk.tls.namedGroups", namedGroups == null || namedGroups.isEmpty() ? "secp384r1" : ", secp384r1");
4747

4848
try {
4949
KEY_PAIR_GEN = KeyPairGenerator.getInstance("EC");

0 commit comments

Comments
 (0)