Bug #114800 wrong code by an old patch
Submitted: 26 Apr 2024 17:11 Modified: 13 Jun 2024 21:57
Reporter: Davide Marrone Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:8.3.0 OS:Any
Assigned to: CPU Architecture:Any

[26 Apr 2024 17:11] Davide Marrone
Description:
Here:

https://github.com/mysql/mysql-connector-j/blob/805f872a57875f311cb82487efcfb070411a3fa0/s...

if (ex instanceof IOException) {
	// IO may be dirty or damaged beyond repair, force close it.
	this.protocol.getSocketConnection().forceClose();
} else if (ex instanceof IOException) {
	invokeCleanupListeners(ex);
}

the "else if" condition has the same condition of the if, it does not make sense, is never executed

How to repeat:
just look a the code

Suggested fix:
I don't know what was the original intention to check for in the else branch, at the moment the else branch could be removed completely with the same behavior of current code
[27 Apr 2024 4:53] MySQL Verification Team
Hello Davide Marrone,

Thank you for the report and feedback.

regards,
Umesh
[13 Jun 2024 21:57] Daniel So
Thank you for your bug report. This issue has been committed to the source repository of the product and will be incorporated into the next release.

Thank you for your interest in MySQL.