branch feature/6688 updated (1b8c7f3 -> 03f7d78)
This is an automated email from the git hooks/post-receive script. New change to branch feature/6688 in repository tutti. See http://git.codelutin.com/tutti.git from 1b8c7f3 do not want to see some logs from nowhere... new 03f7d78 fix list parser when empty value (gave a empty entry) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 03f7d785d8bf79d70c84509832532810b167ce76 Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Feb 19 20:00:24 2015 +0100 fix list parser when empty value (gave a empty entry) Summary of changes: .../service/csv/EntityListParserFormatterSupport.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/6688 in repository tutti. See http://git.codelutin.com/tutti.git commit 03f7d785d8bf79d70c84509832532810b167ce76 Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Feb 19 20:00:24 2015 +0100 fix list parser when empty value (gave a empty entry) --- .../service/csv/EntityListParserFormatterSupport.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tutti-service/src/main/java/fr/ifremer/tutti/service/csv/EntityListParserFormatterSupport.java b/tutti-service/src/main/java/fr/ifremer/tutti/service/csv/EntityListParserFormatterSupport.java index 91a08be..25a0dfb 100644 --- a/tutti-service/src/main/java/fr/ifremer/tutti/service/csv/EntityListParserFormatterSupport.java +++ b/tutti-service/src/main/java/fr/ifremer/tutti/service/csv/EntityListParserFormatterSupport.java @@ -2,6 +2,7 @@ package fr.ifremer.tutti.service.csv; import com.google.common.base.Joiner; import fr.ifremer.tutti.persistence.entities.TuttiEntity; +import org.apache.commons.lang3.StringUtils; import org.nuiton.csv.ValueParserFormatter; import java.text.ParseException; @@ -26,14 +27,17 @@ public abstract class EntityListParserFormatterSupport<E extends TuttiEntity> im public List<E> parse(String value) throws ParseException { List<E> list = new ArrayList<>(); - String[] ids = value.split("\\|"); - for (String id : ids) { + if (StringUtils.isNoneBlank(value)) { - E entity = delegateParserFormatter.parse(id.trim()); - list.add(entity); + String[] ids = value.split("\\|"); + for (String id : ids) { - } + E entity = delegateParserFormatter.parse(id.trim()); + list.add(entity); + + } + } return list; } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm