Skip to content

Conversation

swallez
Copy link
Member

@swallez swallez commented Jun 21, 2022

Improve the toString() method on API objects:

  • the class name is prepended to the JSON representation of the class, to allow identifying it, and also avoir misuse of toString() as a way to serialize objects to JSON
  • add static setter and getter in replacement of the (now deprecated) JsonpUtils.MAX_TO_STRING_LENGTH
  • implement toString() for tagged unions (i.e. variant) objects

@swallez swallez merged commit bd237d1 into main Jun 21, 2022
@swallez swallez deleted the improve-tostring branch June 21, 2022 09:00
@github-actions
Copy link

The backport to 7.17 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-7.17 7.17
# Navigate to the new working tree
cd .worktrees/backport-7.17
# Create a new branch
git switch --create backport-320-to-7.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick --mainline 1 bd237d14210508fca4def6f28e34231055aed531
# Push it to GitHub
git push --set-upstream origin backport-320-to-7.17
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-7.17

Then, create a pull request where the base branch is 7.17 and the compare/head branch is backport-320-to-7.17.

github-actions bot pushed a commit that referenced this pull request Jun 21, 2022
swallez added a commit that referenced this pull request Jun 21, 2022
Co-authored-by: Sylvain Wallez <sylvain@elastic.co>
swallez added a commit that referenced this pull request Jun 21, 2022
swallez added a commit that referenced this pull request Jun 21, 2022
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.

1 participant