[
https://issues.apache.org/jira/browse/SLING-6349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15709700#comment-15709700
]
Justin Edelson commented on SLING-6349:
---------------------------------------
fixed in r1772113. I don't think the output isn't what anyone would
realistically want (which is a good indication that @JsonIgnore) should be
added to the model classes.
> Sling Models Jackson Exporter fails on SlingHttpServletRequest getters
> ----------------------------------------------------------------------
>
> Key: SLING-6349
> URL: https://issues.apache.org/jira/browse/SLING-6349
> Project: Sling
> Issue Type: Bug
> Components: Extensions
> Affects Versions: Sling Models Jackson Exporter 1.0.4
> Reporter: Justin Edelson
> Assignee: Justin Edelson
> Fix For: Sling Models Jackson Exporter 1.0.6
>
>
> If an exported model class has a method like
> {code}
> public SlingHttpServletRequest getRequest() {
> return request;
> }
> {code}
> Then it will fail to export (at least on Jetty) due to a security violation.
> Although these fields should generally have the @JsonIgnore annotation on
> them (since exporting back the request object doesn't make a lot of sense),
> we should at least provide some default serialization so as to ease
> onboarding.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)