{"action":"closed","issue":{"url":"https://api.github.com/repos/FasterXML/jackson-dataformat-csv/issues/66","labels_url":"https://api.github.com/repos/FasterXML/jackson-dataformat-csv/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/FasterXML/jackson-dataformat-csv/issues/66/comments","events_url":"https://api.github.com/repos/FasterXML/jackson-dataformat-csv/issues/66/events","html_url":"https://github.com/FasterXML/jackson-dataformat-csv/issues/66","id":55787629,"number":66,"title":"Deserializing an empty string as an array field return a non-empty list of one empty String","user":{"login":"aksh3ll","id":1485854,"avatar_url":"https://avatars.githubusercontent.com/u/1485854?v=3","gravatar_id":"","url":"https://api.github.com/users/aksh3ll","html_url":"https://github.com/aksh3ll","followers_url":"https://api.github.com/users/aksh3ll/followers","following_url":"https://api.github.com/users/aksh3ll/following{/other_user}","gists_url":"https://api.github.com/users/aksh3ll/gists{/gist_id}","starred_url":"https://api.github.com/users/aksh3ll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aksh3ll/subscriptions","organizations_url":"https://api.github.com/users/aksh3ll/orgs","repos_url":"https://api.github.com/users/aksh3ll/repos","events_url":"https://api.github.com/users/aksh3ll/events{/privacy}","received_events_url":"https://api.github.com/users/aksh3ll/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/FasterXML/jackson-dataformat-csv/milestones/9","labels_url":"https://api.github.com/repos/FasterXML/jackson-dataformat-csv/milestones/9/labels","id":976146,"number":9,"title":"2.5.2","description":null,"creator":{"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},"open_issues":0,"closed_issues":1,"state":"open","created_at":"2015-02-12T00:31:11Z","updated_at":"2015-02-12T00:32:40Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-01-28T17:28:20Z","updated_at":"2015-02-12T00:32:40Z","closed_at":"2015-02-12T00:32:40Z","body":"I have a csv with 11 columns separated with tabulation the last one is an array separated by pipes.\r\nI've declared a schema for the maping.\r\nWhen the array field have one or many values it works fine, but when it has no value, instead of an empty list, i get a list of one empty String \"\".\r\n\r\nI've found this thread http://stackoverflow.com/questions/12933394/jackson-deserialize-as-an-empty-list but, even  with adding the DeserializationFeature presented it didn't change anything (i've try with and withFeatures, i don't see the difference?).\r\n\r\nEven if i can't modify the source file, i've tried with quotes, it doesn't change anything.\r\n\r\n```Java\r\n\t\tCsvSchema schema = CsvSchema.builder()\r\n\t\t\t\t.setColumnSeparator('\\t')\r\n\t\t\t\t.setArrayElementSeparator('|')\r\n\t\t\t\t.disableEscapeChar()\r\n\t\t\t\t.disableQuoteChar()\r\n\t\t\t\t.setUseHeader(false)\r\n\t\t\t\t.setNullValue(\"\")\r\n\t\t        .addNumberColumn(\"extId\") // 0\r\n\t\t        .addNumberColumn(\"intId\") // 1\r\n\t\t        .addNumberColumn(\"pct\") // 2\r\n\t\t        .addNumberColumn(\"mask\") // 3\r\n\t\t        .addColumn(Column.PLACEHOLDER) // 4\r\n\t\t        .addColumn(\"singName\") // 5\r\n\t\t        .addColumn(\"PlurName\") // 6\r\n\t\t        .addColumn(Column.PLACEHOLDER) // 7\r\n\t\t        .addColumn(Column.PLACEHOLDER) // 8\r\n\t\t        .addColumn(Column.PLACEHOLDER) // 9\r\n\t\t        .addArrayColumn(\"aliases\") // 10\r\n\t\t        .build();\r\n\r\n\t\tCsvMapper mapper = new CsvMapper();\r\n\t\tthis.it = mapper\r\n\t\t\t\t.reader(clazz)\r\n\t\t\t\t.withFeatures(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, \r\n\t\t\t\t\t\tDeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT,\r\n\t\t\t\t\t\tDeserializationFeature.USE_JAVA_ARRAY_FOR_JSON_ARRAY)\r\n\t\t\t\t.with(schema)\r\n\t\t\t\t.readValues(reader);\r\n```\r\n\r\nAccording to the idea of the thread i've modified my setter, but it's not a good solution.\r\n```Java\r\n    @JsonProperty(\"aliases\")\r\n    public void setAliases(List<String> aliases) {\r\n    \tif (aliases == null || (aliases.size() == 1 && \"\".equals(aliases.get(0))))\r\n    \t\tthis.aliases = new ArrayList<String>();\r\n    \telse\r\n    \t\tthis.aliases = aliases;\r\n    }\r\n```\r\nMaybe i've missed something?"}}