Skip to content

[improvement] Beans with no fields generate toString methods returning constant values#354

Merged
bulldozer-bot[bot] merged 2 commits into
developfrom
ckozak/simple_tostring
Apr 22, 2019
Merged

[improvement] Beans with no fields generate toString methods returning constant values#354
bulldozer-bot[bot] merged 2 commits into
developfrom
ckozak/simple_tostring

Conversation

@carterkozak
Copy link
Copy Markdown
Contributor

After this PR

==COMMIT_MSG==
Beans with no fields generate toString methods returning constant values
==COMMIT_MSG==

@carterkozak carterkozak requested a review from a team as a code owner April 20, 2019 17:58
@carterkozak
Copy link
Copy Markdown
Contributor Author

Out of curiosity, @iamdanfox do you recall why this was added?

// Need to add JsonSerialize annotation which indicates that the empty bean serializer should be used to
// serialize this class. Without this annotation no serializer will be set for this class, thus preventing
// serialization.
typeBuilder
.addAnnotation(JsonSerialize.class)
.addField(createSingletonField(objectClass));

Tests don't fail without it, but it may work differently on older builds of jackson.

@bulldozer-bot bulldozer-bot Bot merged commit 455e651 into develop Apr 22, 2019
@bulldozer-bot bulldozer-bot Bot deleted the ckozak/simple_tostring branch April 22, 2019 01:01
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.

2 participants