{"action":"created","issue":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/936","labels_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/936/labels{/name}","comments_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/936/comments","events_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/936/events","html_url":"https://github.com/AutoMapper/AutoMapper/issues/936","id":112171508,"number":936,"title":"Mapping from a null array doesn't overwrite not null array with empty array when AllowNullCollections is false","user":{"login":"dougdanger","id":11986285,"avatar_url":"https://avatars.githubusercontent.com/u/11986285?v=3","gravatar_id":"","url":"https://api.github.com/users/dougdanger","html_url":"https://github.com/dougdanger","followers_url":"https://api.github.com/users/dougdanger/followers","following_url":"https://api.github.com/users/dougdanger/following{/other_user}","gists_url":"https://api.github.com/users/dougdanger/gists{/gist_id}","starred_url":"https://api.github.com/users/dougdanger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougdanger/subscriptions","organizations_url":"https://api.github.com/users/dougdanger/orgs","repos_url":"https://api.github.com/users/dougdanger/repos","events_url":"https://api.github.com/users/dougdanger/events{/privacy}","received_events_url":"https://api.github.com/users/dougdanger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-19T15:38:57Z","updated_at":"2015-10-20T03:10:52Z","closed_at":null,"body":"    class TestClass\r\n    {\r\n        public string[] ArrayOfItems { get; set; }\r\n        public List<string> ListOfItem { get; set; }\r\n    }\r\n    \r\n    void Main()\r\n    {\r\n        var one = new TestClass\r\n        {\r\n            ArrayOfItems = new string[] { \"Red Fish\", \"Blue Fish\" },\r\n            ListOfItem = new List<string> { \"One Fish\", \"Two Fish\" }\r\n        };\r\n        \r\n        Mapper.Configuration.AllowNullCollections = false;\r\n        Mapper.CreateMap<TestClass, TestClass>();\r\n            \r\n        Mapper.Map(new TestClass(), one);\r\n    }\r\n\r\nThe expectation is that when mapping from a new instance of `TestClass` that `ArrayOfItems` will be an empty collection like `ListOfItems`. In LinqPad `one.Dump()` produces the following result:\r\n\r\n![current_behavior](https://cloud.githubusercontent.com/assets/11986285/10582042/d1e2ac48-7653-11e5-8333-8c78cf06c39c.png)\r\n\r\nWhen `Mapper.Configuration.AllowNullCollections` equals `true` both collections are appropriately `null`.\r\n"},"comment":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/comments/149415126","html_url":"https://github.com/AutoMapper/AutoMapper/issues/936#issuecomment-149415126","issue_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/936","id":149415126,"user":{"login":"jbogard","id":104498,"avatar_url":"https://avatars.githubusercontent.com/u/104498?v=3","gravatar_id":"","url":"https://api.github.com/users/jbogard","html_url":"https://github.com/jbogard","followers_url":"https://api.github.com/users/jbogard/followers","following_url":"https://api.github.com/users/jbogard/following{/other_user}","gists_url":"https://api.github.com/users/jbogard/gists{/gist_id}","starred_url":"https://api.github.com/users/jbogard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbogard/subscriptions","organizations_url":"https://api.github.com/users/jbogard/orgs","repos_url":"https://api.github.com/users/jbogard/repos","events_url":"https://api.github.com/users/jbogard/events{/privacy}","received_events_url":"https://api.github.com/users/jbogard/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T03:10:52Z","updated_at":"2015-10-20T03:10:52Z","body":"I'm confused, you're mapping a type to itself?"}}