aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-xoo-plugin/src
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-10-09 12:02:32 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2014-10-09 12:02:32 +0200
commitfde900a0be3a5ec99d0b6dfcde4cf18d531210f6 (patch)
treee9db39dac2810cc1138ebf38d73ff11817c3e054 /plugins/sonar-xoo-plugin/src
parent1f2c767187d23d71f2af67a2c1686eb849f3c717 (diff)
downloadsonarqube-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.java8
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));
}
}