Skip to content

Commit

Permalink
Properly Format BigDecimal Attributes.
Browse files Browse the repository at this point in the history
This builds on eed3si9n#483.
The case is not solved when `toXML` is called for a generated class and one of its attribute is a BigDecimal.
  • Loading branch information
tOverney committed Apr 5, 2019
1 parent dddfbfb commit e4d8afd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cli/src/main/scala/scalaxb/compiler/xsd/XMLOutput.scala
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ trait XMLOutput extends Args {
case symbol: BuiltInSimpleTypeSymbol => case symbol: BuiltInSimpleTypeSymbol =>
buildTypeName(symbol) match { buildTypeName(symbol) match {
case "javax.xml.namespace.QName" => "scalaxb.Helper.toString(%s, __scope)" format selector case "javax.xml.namespace.QName" => "scalaxb.Helper.toString(%s, __scope)" format selector
case "BigDecimal" => selector + ".toPlainString"
case _ => selector + ".toString" case _ => selector + ".toString"
} }
case ReferenceTypeSymbol(decl: SimpleTypeDecl) => case ReferenceTypeSymbol(decl: SimpleTypeDecl) =>
Expand Down

0 comments on commit e4d8afd

Please sign in to comment.