Skip to content

Commit

Permalink
Singleton beans use a JsonCreator with mode=PROPERTIES (#2351)
Browse files Browse the repository at this point in the history
Singleton beans use a JsonCreator with mode=PROPERTIES
  • Loading branch information
carterkozak authored Sep 5, 2024
1 parent 19d7f54 commit 6426718
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions changelog/@unreleased/pr-2351.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: improvement
improvement:
description: Singleton beans use a JsonCreator with mode=PROPERTIES
links:
- https://github.com/palantir/conjure-java/pull/2351

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ private static MethodSpec createStaticFactoryMethodForEmptyBean(ClassName object
return MethodSpec.methodBuilder("of")
.addModifiers(Modifier.PUBLIC, Modifier.STATIC)
.returns(objectClass)
.addAnnotation(ConjureAnnotations.delegatingJsonCreator())
.addAnnotation(ConjureAnnotations.propertiesJsonCreator())
.addCode("return $L;", SINGLETON_INSTANCE_NAME)
.build();
}
Expand Down

0 comments on commit 6426718

Please sign in to comment.