{"action":"created","issue":{"url":"https://api.github.com/repos/FasterXML/jackson-module-jaxb-annotations/issues/61","repository_url":"https://api.github.com/repos/FasterXML/jackson-module-jaxb-annotations","labels_url":"https://api.github.com/repos/FasterXML/jackson-module-jaxb-annotations/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/FasterXML/jackson-module-jaxb-annotations/issues/61/comments","events_url":"https://api.github.com/repos/FasterXML/jackson-module-jaxb-annotations/issues/61/events","html_url":"https://github.com/FasterXML/jackson-module-jaxb-annotations/issues/61","id":173523295,"number":61,"title":"transient fields serialized when @XmlAccessorType(XmlAccessType.FIELD) is present","user":{"login":"dsharp1","id":15839803,"avatar_url":"https://avatars.githubusercontent.com/u/15839803?v=3","gravatar_id":"","url":"https://api.github.com/users/dsharp1","html_url":"https://github.com/dsharp1","followers_url":"https://api.github.com/users/dsharp1/followers","following_url":"https://api.github.com/users/dsharp1/following{/other_user}","gists_url":"https://api.github.com/users/dsharp1/gists{/gist_id}","starred_url":"https://api.github.com/users/dsharp1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsharp1/subscriptions","organizations_url":"https://api.github.com/users/dsharp1/orgs","repos_url":"https://api.github.com/users/dsharp1/repos","events_url":"https://api.github.com/users/dsharp1/events{/privacy}","received_events_url":"https://api.github.com/users/dsharp1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-08-26T19:13:24Z","updated_at":"2016-09-17T01:09:06Z","closed_at":null,"body":"private transient fields are serialized when the class is annotated with XmlAccessType.FIELD.\r\n\r\nThe cause is related to the way that the _addFields method in POJOPropertiesCollector determines if the field should be skipped.  If the field is transient AND the field name is null (where the field name is determined by XmlElement, XmlElementWrapper, etc), the field is marked as not visible and gets skipped.  \r\n\r\nWhen the  isVisible method in JaxbAnnotationIntrospector returns true if the annotated class has a XmlAccessType.FIELD class annotation, this causes the name to be returned as PropertyName.USE_DEFAULT instead of null.  This means that the name is not null (its and empty string) when _addFields method checks the transient field and therefore it does not check if the field is transient.\r\n\r\nThe attached unit test demonstrates the use case and results in a stackoverflow due to infinite recursion.  Removing the @XmlAccessorType(XmlAccessType.FIELD) will allow the test to run without an error.\r\n[simple.zip](https://github.com/FasterXML/jackson-module-jaxb-annotations/files/439947/simple.zip)\r\n"},"comment":{"url":"https://api.github.com/repos/FasterXML/jackson-module-jaxb-annotations/issues/comments/247740107","html_url":"https://github.com/FasterXML/jackson-module-jaxb-annotations/issues/61#issuecomment-247740107","issue_url":"https://api.github.com/repos/FasterXML/jackson-module-jaxb-annotations/issues/61","id":247740107,"user":{"login":"cowtowncoder","id":55065,"avatar_url":"https://avatars.githubusercontent.com/u/55065?v=3","gravatar_id":"","url":"https://api.github.com/users/cowtowncoder","html_url":"https://github.com/cowtowncoder","followers_url":"https://api.github.com/users/cowtowncoder/followers","following_url":"https://api.github.com/users/cowtowncoder/following{/other_user}","gists_url":"https://api.github.com/users/cowtowncoder/gists{/gist_id}","starred_url":"https://api.github.com/users/cowtowncoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cowtowncoder/subscriptions","organizations_url":"https://api.github.com/users/cowtowncoder/orgs","repos_url":"https://api.github.com/users/cowtowncoder/repos","events_url":"https://api.github.com/users/cowtowncoder/events{/privacy}","received_events_url":"https://api.github.com/users/cowtowncoder/received_events","type":"User","site_admin":false},"created_at":"2016-09-17T01:09:06Z","updated_at":"2016-09-17T01:09:06Z","body":"@rpatrick00 I haven't had time to look into this. From above I am not 100% what the suggested fix is, although as it is related to name handling of JAXB module, perhaps it can be handled here, locally.\r\nThat'd be good since changes to `jackson-databind` often have higher risk of regression.\r\n"}}
{"actor":{"display_login":"cowtowncoder"}}