diff --git a/sonar-swift-plugin/src/main/java/org/sonar/plugins/swift/surefire/data/SurefireStaxHandler.java b/sonar-swift-plugin/src/main/java/org/sonar/plugins/swift/surefire/data/SurefireStaxHandler.java index 87ab520b..c973c1ed 100755 --- a/sonar-swift-plugin/src/main/java/org/sonar/plugins/swift/surefire/data/SurefireStaxHandler.java +++ b/sonar-swift-plugin/src/main/java/org/sonar/plugins/swift/surefire/data/SurefireStaxHandler.java @@ -121,6 +121,9 @@ private static UnitTestResult parseTestResult(SMInputCursor testCaseCursor) thro private static long getTimeAttributeInMS(String value) throws XMLStreamException { // hardcoded to Locale.ENGLISH see http://jira.codehaus.org/browse/SONAR-602 + if (value == null) { + value = "0"; + } try { Double time = ParsingUtils.parseNumber(value, Locale.ENGLISH); return !Double.isNaN(time) ? (long) ParsingUtils.scaleValue(time * 1000, 3) : 0L;