Skip to content

[ISSUE #14479] Fix typo and improve code quality in health check processors#14480

Merged
KomachiSion merged 1 commit into
alibaba:developfrom
DocJlm:fix/improve-healthcheck-processors
Feb 25, 2026
Merged

[ISSUE #14479] Fix typo and improve code quality in health check processors#14480
KomachiSion merged 1 commit into
alibaba:developfrom
DocJlm:fix/improve-healthcheck-processors

Conversation

@DocJlm

@DocJlm DocJlm commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

What is the purpose of the change

Fix typo, incorrect Javadoc, and improve resource management in health check processors under the naming module. Resolves #14479.

  • Fix typo: rename deepth to depth in HttpHealthCheckProcessor and MysqlHealthCheckProcessor loop variables
  • Fix incorrect Javadoc: MysqlHealthCheckProcessor was documented as "TCP health check processor" instead of "MySQL health check processor"
  • Refactor MysqlCheckTask to use try-with-resources for Statement and ResultSet, ensuring proper resource cleanup and reducing boilerplate code in the finally block

Brief changelog

  • HttpHealthCheckProcessor.java: Fix variable name typo (deepthdepth)
  • MysqlHealthCheckProcessor.java: Fix Javadoc, fix typo, refactor to try-with-resources

Verifying this change

This is a code quality improvement. The logic remains the same, only resource management pattern and naming are improved. Existing tests cover the functionality.

  • Make sure there is a Github issue filed for the change.
  • Format the pull request title like [ISSUE #14479] Fix typo and improve code quality in health check processors.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • This change does not alter logic, only fixes typo, Javadoc, and resource management pattern, so no new unit tests are needed.

@CLAassistant

CLAassistant commented Feb 21, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown

Thanks for your this PR. 🙏
Please check again for your PR changes whether contains any usage/api/configuration change such as Add new API , Add new configuration, Change default value of configuration.
If so, please add or update documents(markdown type) in docs/next/ for repository nacos-group/nacos-group.github.io


感谢您提交的PR。 🙏
请再次查看您的PR内容,确认是否包含任何使用方式/API/配置参数的变更,如:新增API新增配置参数修改默认配置等操作。
如果是,请确保在提交之前,在仓库nacos-group/nacos-group.github.io中的docs/next/目录下添加或更新文档(markdown格式)。

KomachiSion
KomachiSion previously approved these changes Feb 25, 2026
@KomachiSion

Copy link
Copy Markdown
Collaborator

Please Fix the CI problem. @DocJlm

- Fix typo: rename 'deepth' to 'depth' in HttpHealthCheckProcessor
  and MysqlHealthCheckProcessor loop variables
- Fix incorrect Javadoc: MysqlHealthCheckProcessor was documented as
  "TCP health check processor" instead of "MySQL health check processor"
- Refactor MysqlCheckTask to use try-with-resources for Statement and
  ResultSet, ensuring proper resource cleanup and reducing boilerplate
  code in the finally block
@DocJlm
DocJlm force-pushed the fix/improve-healthcheck-processors branch from e25444c to ba50980 Compare February 25, 2026 05:06
@DocJlm

DocJlm commented Feb 25, 2026

Copy link
Copy Markdown
Contributor Author

Fixed. Removed the unused import com.alibaba.nacos.naming.misc.Loggers that was left over after the try-with-resources refactoring. @KomachiSion Could you please approve the workflows and re-review? Thanks

@KomachiSion
KomachiSion merged commit a2b3bde into alibaba:develop Feb 25, 2026
3 checks passed
@KomachiSion KomachiSion added this to the 3.2.0 milestone Feb 25, 2026
@KomachiSion

Copy link
Copy Markdown
Collaborator

@DocJlm Thanks

@DocJlm
DocJlm deleted the fix/improve-healthcheck-processors branch February 25, 2026 07:04
@wuyfee

wuyfee commented Feb 25, 2026

Copy link
Copy Markdown

$\color{red}{FAILURE}$
DETAILS
✅ - docker: success
❌ - deploy (standalone & cluster & standalone_auth): failure
❌ - e2e-java-test (standalone & cluster & standalone_auth): skipped
❌ - e2e-go-test (standalone & cluster): skipped
❌ - e2e-cpp-test (standalone & cluster): skipped
❌ - e2e-csharp-test (standalone & cluster): skipped
❌ - e2e-nodejs-test (standalone & cluster): skipped
❌ - e2e-python-test (standalone & cluster): skipped
✅ - clean (standalone & cluster & standalone_auth): success

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix typo, incorrect Javadoc and improve resource management in health check processors

4 participants