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

[TASK][TRIVIAL] Avoid NPE in MySQLErrPacket #6291

Closed
3 tasks done
wForget opened this issue Apr 11, 2024 · 2 comments
Closed
3 tasks done

[TASK][TRIVIAL] Avoid NPE in MySQLErrPacket #6291

wForget opened this issue Apr 11, 2024 · 2 comments
Assignees

Comments

@wForget
Copy link
Member

wForget commented Apr 11, 2024

What's the level of this task?

TRIVIAL

Code of Conduct

Search before creating

  • I have searched in the task list and found no similar tasks.

Mentor

  • I have sufficient expertise on this task, and I volunteer to be a mentor of this task to guide contributors through the task.

Skill requirements

  • Basic knowledge on scala

Background and Goals

NullPointerException may occur in MySQLErrPacket

- transfer connection url when opening connection
java.lang.NullPointerException
	at org.apache.kyuubi.server.mysql.MySQLErrPacket$.apply(MySQLGenericPackets.scala:57)
	at org.apache.kyuubi.server.mysql.MySQLCommandHandler.exceptionCaught(MySQLCommandHandler.scala:63)
	at org.apache.kyuubi.server.mysql.MySQLCommandHandler.$anonfun$channelRead0$2(MySQLCommandHandler.scala:86)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)

Implementation steps

Add non-null detection for e.getMessage

Additional context

Introduction of 2024H1 Kyuubi Code Contribution Program

@zhaohehuhu
Copy link
Contributor

plz assign this task to me @wForget

@wForget
Copy link
Member Author

wForget commented Apr 11, 2024

plz assign this task to me @wForget

thanks, assigned

pan3793 pushed a commit that referenced this issue Apr 11, 2024
# 🔍 Description
as title
## Issue References 🔗

This pull request fixes #6291

## Describe Your Solution 🔧

Add a rule to check if it's null

## Types of changes 🔖

- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

#### Behavior Without This Pull Request ⚰️

#### Behavior With This Pull Request 🎉

#### Related Unit Tests

---

# Checklist 📝

- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6292 from zhaohehuhu/dev-0411.

Closes #6291

a58eed6 [hezhao2] refactor
40ad5e0 [hezhao2] Avoid NPE in MySQLErrPacket
e02be17 [dupeng] [KYUUBI #6288] [KYUUBI  #6283] Improve the message of distribution built without enabling web ui

Lead-authored-by: hezhao2 <hezhao2@cisco.com>
Co-authored-by: dupeng <dunett@163.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit f43cc59)
Signed-off-by: Cheng Pan <chengpan@apache.org>
pan3793 pushed a commit that referenced this issue Apr 11, 2024
# 🔍 Description
as title
## Issue References 🔗

This pull request fixes #6291

## Describe Your Solution 🔧

Add a rule to check if it's null

## Types of changes 🔖

- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

#### Behavior Without This Pull Request ⚰️

#### Behavior With This Pull Request 🎉

#### Related Unit Tests

---

# Checklist 📝

- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6292 from zhaohehuhu/dev-0411.

Closes #6291

a58eed6 [hezhao2] refactor
40ad5e0 [hezhao2] Avoid NPE in MySQLErrPacket
e02be17 [dupeng] [KYUUBI #6288] [KYUUBI  #6283] Improve the message of distribution built without enabling web ui

Lead-authored-by: hezhao2 <hezhao2@cisco.com>
Co-authored-by: dupeng <dunett@163.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit f43cc59)
Signed-off-by: Cheng Pan <chengpan@apache.org>
pan3793 pushed a commit that referenced this issue Apr 11, 2024
# 🔍 Description
as title
## Issue References 🔗

This pull request fixes #6291

## Describe Your Solution 🔧

Add a rule to check if it's null

## Types of changes 🔖

- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

#### Behavior Without This Pull Request ⚰️

#### Behavior With This Pull Request 🎉

#### Related Unit Tests

---

# Checklist 📝

- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6292 from zhaohehuhu/dev-0411.

Closes #6291

a58eed6 [hezhao2] refactor
40ad5e0 [hezhao2] Avoid NPE in MySQLErrPacket
e02be17 [dupeng] [KYUUBI #6288] [KYUUBI  #6283] Improve the message of distribution built without enabling web ui

Lead-authored-by: hezhao2 <hezhao2@cisco.com>
Co-authored-by: dupeng <dunett@163.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit f43cc59)
Signed-off-by: Cheng Pan <chengpan@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants