{"action":"created","issue":{"url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/1595","repository_url":"https://api.github.com/repos/FasterXML/jackson-databind","labels_url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/1595/labels{/name}","comments_url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/1595/comments","events_url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/1595/events","html_url":"https://github.com/FasterXML/jackson-databind/issues/1595","id":220161851,"number":1595,"title":"JsonIgnoreProperties allowSetters is not working","user":{"login":"AnywnYu","id":17541281,"avatar_url":"https://avatars1.githubusercontent.com/u/17541281?v=3","gravatar_id":"","url":"https://api.github.com/users/AnywnYu","html_url":"https://github.com/AnywnYu","followers_url":"https://api.github.com/users/AnywnYu/followers","following_url":"https://api.github.com/users/AnywnYu/following{/other_user}","gists_url":"https://api.github.com/users/AnywnYu/gists{/gist_id}","starred_url":"https://api.github.com/users/AnywnYu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnywnYu/subscriptions","organizations_url":"https://api.github.com/users/AnywnYu/orgs","repos_url":"https://api.github.com/users/AnywnYu/repos","events_url":"https://api.github.com/users/AnywnYu/events{/privacy}","received_events_url":"https://api.github.com/users/AnywnYu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-04-07T09:36:46Z","updated_at":"2017-04-25T09:56:34Z","closed_at":"2017-04-24T03:14:14Z","body":"```\r\n@JsonIgnoreProperties(value = { \"password\" }, ignoreUnknown = true, allowSetters = true)\r\npublic class JsonTest {\r\n\tprivate String username;\r\n\tprivate String password;\r\n\r\n\tpublic JsonTest() {\r\n\t\tsuper();\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}\r\n\r\n\tpublic JsonTest(String username, String password) {\r\n\t\tsuper();\r\n\t\tthis.username = username;\r\n\t\tthis.password = password;\r\n\t}\r\n\r\n\tpublic String getUsername() {\r\n\t\treturn username;\r\n\t}\r\n\r\n\tpublic void setUsername(String username) {\r\n\t\tthis.username = username;\r\n\t}\r\n\r\n\tpublic String getPassword() {\r\n\t\treturn password;\r\n\t}\r\n\r\n\tpublic void setPassword(String password) {\r\n\t\tthis.password = password;\r\n\t}\r\n\r\n\tpublic static void main(String[] args) {\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\r\n\t\tJsonTest json = new JsonTest(\"user\", \"password\");\r\n\r\n\t\ttry {\r\n\t\t\tSystem.out.println(mapper.writeValueAsString(json));\r\n\t\t} catch (JsonProcessingException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tString jsonString = \"{ \\\"username\\\":\\\"username\\\",\\\"password\\\":\\\"password\\\" }\";\r\n\t\ttry {\r\n\t\t\tjson = mapper.readValue(jsonString, JsonTest.class);\r\n\r\n\t\t\tSystem.out.println(json.getPassword());\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}\r\n}\r\n```\r\n\r\nthe version is 2.8.7.\r\nthe password cannot deserialize.\r\nthe output is:\r\n{\"username\":\"user\"}\r\nnull"},"comment":{"url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/comments/296980924","html_url":"https://github.com/FasterXML/jackson-databind/issues/1595#issuecomment-296980924","issue_url":"https://api.github.com/repos/FasterXML/jackson-databind/issues/1595","id":296980924,"user":{"login":"AnywnYu","id":17541281,"avatar_url":"https://avatars1.githubusercontent.com/u/17541281?v=3","gravatar_id":"","url":"https://api.github.com/users/AnywnYu","html_url":"https://github.com/AnywnYu","followers_url":"https://api.github.com/users/AnywnYu/followers","following_url":"https://api.github.com/users/AnywnYu/following{/other_user}","gists_url":"https://api.github.com/users/AnywnYu/gists{/gist_id}","starred_url":"https://api.github.com/users/AnywnYu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnywnYu/subscriptions","organizations_url":"https://api.github.com/users/AnywnYu/orgs","repos_url":"https://api.github.com/users/AnywnYu/repos","events_url":"https://api.github.com/users/AnywnYu/events{/privacy}","received_events_url":"https://api.github.com/users/AnywnYu/received_events","type":"User","site_admin":false},"created_at":"2017-04-25T09:56:34Z","updated_at":"2017-04-25T09:56:34Z","body":"@runjia1987 我的英文不怎么样,没看太明白.\r\n你能否提供给@cowtowncoder一个能跑的test case?"}}
{"actor":{"display_login":"AnywnYu"}}