Skip to content

Fix Javadoc for Jackson2ObjectMapperFactoryBean [SPR-13765] #18339

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

Closed
spring-projects-issues opened this issue Dec 6, 2015 · 1 comment
Closed
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches type: task A general task
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

umesha balasubramaniam opened SPR-13765 and commented

The javadoc for Jackson2ObjectMapperFactoryBean has an error when it describes the how to set the featuresEnabled property. The documentation incorrectly describes using the $ syntax to refer to the enum value:

<util:constant static-field="com.fasterxml.jackson.databind.SerializationFeature$WRAP_ROOT_VALUE"/>
<util:constant static-field="com.fasterxml.jackson.databind.SerializationFeature$CLOSE_CLOSEABLE"/>
<util:constant static-field="com.fasterxml.jackson.databind.MapperFeature$USE_ANNOTATIONS"/>

It should use the dot syntax:

<util:constant static-field="com.fasterxml.jackson.databind.SerializationFeature.WRAP_ROOT_VALUE"/>
<util:constant static-field="com.fasterxml.jackson.databind.SerializationFeature.CLOSE_CLOSEABLE"/>
<util:constant static-field="com.fasterxml.jackson.databind.MapperFeature.USE_ANNOTATIONS"/>

Affects: 3.2.15, 4.1.8, 4.2.3

Reference URL: http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBean.html#setFeaturesToEnable-java.lang.Object...-

Referenced from: commits 242acda, 1585a82, f7031df

Backported to: 4.1.9, 3.2.16

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Good catch! In that context, static field references need to use Java source code syntax (dot separators), not runtime class name separators (dollars)...

Juergen

@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches in: web Issues in web modules (web, webmvc, webflux, websocket) type: task A general task labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.2.4 milestone Jan 11, 2019
This was referenced Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches type: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants