Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed NPE with SslMode.TUNNEL Usage #225

Merged
merged 4 commits into from
Feb 8, 2024
Merged

Fixed NPE with SslMode.TUNNEL Usage #225

merged 4 commits into from
Feb 8, 2024

Conversation

jchrys
Copy link
Collaborator

@jchrys jchrys commented Feb 7, 2024

Motivation:
A NPE was identified when utilizing SslMode.TUNNEL. The issue arises when ConnectionContext#isMariaDb is invoked from SslBridgeHandler#isTls13Enabled, leading to an NPE due to the ConnectionContext not being initialized at that time.

Modification:
Do not invoke ConnectionContext#isMariaDb when it is not initialized.

Result:
This change addresses the NPE issue, ensuring stability when SslMode.TUNNEL is selected. It resolves the problem reported in GoogleCloudPlatform/cloud-sql-jdbc-socket-factory#1828

@jchrys jchrys added the bug Something isn't working label Feb 7, 2024
@jchrys jchrys added this to the 1.1.1 milestone Feb 7, 2024
@jchrys jchrys requested a review from mirromutth February 7, 2024 16:37
@jchrys
Copy link
Collaborator Author

jchrys commented Feb 7, 2024

PTAL @mirromutth @JohnNiang

@jchrys jchrys force-pushed the 1x-fix-npe-tunnel branch from ad9fc41 to 56eb874 Compare February 7, 2024 16:52
@jchrys
Copy link
Collaborator Author

jchrys commented Feb 7, 2024

Planning to release version 1.1.1 once this issue is resolved.

@jchrys jchrys modified the milestones: 1.1.2, 1.1.1 Feb 7, 2024
Copy link
Contributor

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jchrys jchrys force-pushed the 1x-fix-npe-tunnel branch 2 times, most recently from 684e95c to 9980c67 Compare February 7, 2024 19:32
@jchrys jchrys requested a review from JohnNiang February 7, 2024 19:34
Motivation:
A NPE was identified when utilizing `SslMode.TUNNEL`. The issue arises when `ConnectionContext#isMariaDb` is invoked from `SslBridgeHandler#isTls13Enabled`, leading to an NPE due to the `ConnectionContext` not being initialized at that time.

Modification:
Do not invoke `ConnectionContext#isMariaDb` when it is not initialized.

Result:
This change addresses the NPE issue, ensuring stability when `SslMode.TUNNEL` is selected.
resolves GoogleCloudPlatform/cloud-sql-jdbc-socket-factory#1828
@jchrys jchrys force-pushed the 1x-fix-npe-tunnel branch from 9980c67 to 666cc3e Compare February 7, 2024 20:22
jchrys and others added 3 commits February 8, 2024 12:06
Co-authored-by: Mirro Mutth <mirromutth@gmail.com>
Signed-off-by: jchrys <jchrys@me.com>
@jchrys jchrys requested a review from mirromutth February 8, 2024 03:21
Copy link
Contributor

@mirromutth mirromutth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jchrys jchrys merged commit 5474bf2 into trunk Feb 8, 2024
12 checks passed
@jchrys jchrys deleted the 1x-fix-npe-tunnel branch February 8, 2024 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants