-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add a custom toString to DynamicMap #126562
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
Conversation
|
Hi @jdconrad, I've created a changelog YAML for you. |
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
| int count = 0; | ||
| for (Map.Entry<String, Object> entry : entrySet()) { | ||
| sb.append(entry.getKey()); | ||
| sb.append(": "); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should the same format as other Map's (eg HashMap, Map.of, etc) in Java use, which I believe is with curly braces and = between key/values. Also I wonder if we need the DynamicMap prefix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed to match AbstractMap
rjernst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This change prevents a delegate map from giving an inconsistent toString or an empty toString.
Closes #70262