Skip to content

Commit 7cbd2cd

Browse files
committed
Fix to prevent NPE on capabilites.getTls() caused by missing 'tls' key.
1 parent ef9f0e0 commit 7cbd2cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/protocol-impl/java/com/mysql/cj/protocol/x/XServerCapabilities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public String getNodeType() {
5959
}
6060

6161
public boolean getTls() {
62-
return this.capabilities.get("tls").getScalar().getVBool();
62+
return hasCapability("tls") ? this.capabilities.get("tls").getScalar().getVBool() : false;
6363
}
6464

6565
public boolean getClientPwdExpireOk() {

0 commit comments

Comments
 (0)