diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2014-10-09 12:02:32 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2014-10-09 12:02:32 +0200 |
commit | fde900a0be3a5ec99d0b6dfcde4cf18d531210f6 (patch) | |
tree | e9db39dac2810cc1138ebf38d73ff11817c3e054 /plugins/sonar-xoo-plugin/src | |
parent | 1f2c767187d23d71f2af67a2c1686eb849f3c717 (diff) | |
download | sonarqube-fde900a0be3a5ec99d0b6dfcde4cf18d531210f6.tar.gz sonarqube-fde900a0be3a5ec99d0b6dfcde4cf18d531210f6.zip |
Fix some quality flaws
Diffstat (limited to 'plugins/sonar-xoo-plugin/src')
-rw-r--r-- | plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/scm/XooBlameCommand.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/scm/XooBlameCommand.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/scm/XooBlameCommand.java index fa0e1616a30..0534d92d8cb 100644 --- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/scm/XooBlameCommand.java +++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/scm/XooBlameCommand.java @@ -69,11 +69,11 @@ public class XooBlameCommand implements BlameCommand, BatchComponent { if (fields.length < 3) { throw new IllegalStateException("Not enough fields on line " + lineNumber); } - String revision = fields[0]; - String author = fields[1]; + String revision = StringUtils.trimToNull(fields[0]); + String author = StringUtils.trimToNull(fields[1]); + String dateStr = StringUtils.trimToNull(fields[2]); // Will throw an exception, when date is not in format "yyyy-MM-dd" - Date date = DateUtils.parseDate(fields[2]); - + Date date = dateStr != null ? DateUtils.parseDate(dateStr) : null; blame.add(new BlameLine(date, revision, author)); } } |