Skip to content
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

Conform toString() implementations #631

Closed
QuintinWillison opened this issue Nov 20, 2020 · 1 comment · Fixed by #683
Closed

Conform toString() implementations #631

QuintinWillison opened this issue Nov 20, 2020 · 1 comment · Fixed by #683
Assignees
Labels
enhancement New feature or improved functionality.

Comments

@QuintinWillison
Copy link
Contributor

QuintinWillison commented Nov 20, 2020

Match IntelliJ IDEA's boilerplate form, except where there's a reason to present some kind of native representation (e.g. JSON).

See this thread.

┆Issue is synchronized with this Jira Story by Unito

@vzhikserg
Copy link
Contributor

I would like to suggest to use a third-party library called lombok. It helps to automatically generate a log of the boilerplate code (toString, equal, hashcode, and so on). The library is used only at compile time. It is published under the MIT license.

Example:
If we add the lombok @ToString annotation for the MessagExtras class it will generate the following output:

MessageExtras(delta=null, jsonObject={"someKey":"someValue"})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improved functionality.
Development

Successfully merging a pull request may close this issue.

3 participants