Skip to content

Commit 413a442

Browse files
committed
Singleton beans use a JsonCreator with mode=PROPERTIES
See the discussion here: FasterXML/jackson-databind#4688 (comment) Ideally we can avoid deserialization failures for existing code, but it's better to align our usage with the maintainers vision either way :-)
1 parent 19d7f54 commit 413a442

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

conjure-java-core/src/integrationInput/java/com/palantir/product/EmptyObjectExample.java

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

conjure-java-core/src/integrationInput/java/com/palantir/strict/EmptyObjectNotStrict.java

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

conjure-java-core/src/integrationInput/java/test/prefix/com/palantir/product/EmptyObjectExample.java

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

conjure-java-core/src/main/java/com/palantir/conjure/java/types/BeanGenerator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ private static MethodSpec createStaticFactoryMethodForEmptyBean(ClassName object
405405
return MethodSpec.methodBuilder("of")
406406
.addModifiers(Modifier.PUBLIC, Modifier.STATIC)
407407
.returns(objectClass)
408-
.addAnnotation(ConjureAnnotations.delegatingJsonCreator())
408+
.addAnnotation(ConjureAnnotations.propertiesJsonCreator())
409409
.addCode("return $L;", SINGLETON_INSTANCE_NAME)
410410
.build();
411411
}

0 commit comments

Comments
 (0)