Skip to content

Conversation

@Layau-code
Copy link
Contributor

Describe what this PR does / why we need it

This PR fixes a malformed toString() output in the Endpoint class, where the host field was printed with an unclosed single quote (e.g., host='localhost, port=8900}). The unmatched quote causes confusing log messages. This change removes the stray quote for a clean format like host=localhost.

Does this pull request fix one issue?

Fixes #3573

Describe how you did it

Removed the opening single quote before the host value in the toString() method of com.alibaba.csp.sentinel.transport.heartbeat.Endpoint, so the field is now printed without quotes.

Describe how to verify it

  1. Build with mvn clean package.

  2. Run a demo that connects to Sentinel Dashboard (e.g., sentinel-demo-basic).

  3. Check logs during startup or heartbeat — the output should be:

    Endpoint{protocol=HTTP, host=localhost, port=8900}

No unmatched quotes appear.

Special notes for reviews

  • Purely cosmetic; no functional impact.
  • Safe to omit quotes since host is typically a hostname or IP without special characters.
  • Consistent with the style of other fields (protocol, port) which are also unquoted.

修改了打印host没有闭合的问题
@CLAassistant
Copy link

CLAassistant commented Nov 13, 2025

CLA assistant check
All committers have signed the CLA.

@LearningGp LearningGp added the kind/bug Category issues or prs related to bug. label Nov 25, 2025
@LearningGp LearningGp moved this to In review in Sentinel Nov 25, 2025
@Layau-code Layau-code closed this Dec 8, 2025
@github-project-automation github-project-automation bot moved this from In review to Done in Sentinel Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Category issues or prs related to bug.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[BUG] com.alibaba.csp.sentinel.transport.endpoint.EndPoint#toString()打印格式有误

3 participants