Skip to content

Commit

Permalink
fix java.lang.NumberFormatException: empty String
Browse files Browse the repository at this point in the history
  • Loading branch information
vfadc committed Aug 13, 2019
1 parent 1340a83 commit 61b7619
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package ftl.reports.xml.model

import com.fasterxml.jackson.annotation.JsonInclude
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty
import java.util.*
import java.util.Locale

data class JUnitTestSuite(
@JacksonXmlProperty(isAttribute = true)
Expand Down Expand Up @@ -79,7 +79,7 @@ data class JUnitTestSuite(
}

private fun mergeDouble(a: String?, b: String?): String {
return "%.3f".format((a.clean().toDouble() + b.clean().toDouble()))
return "%.3f".format(Locale.ROOT, (a.clean().toDouble() + b.clean().toDouble()))
}

fun merge(other: JUnitTestSuite): JUnitTestSuite {
Expand Down

0 comments on commit 61b7619

Please sign in to comment.