mbeckerle commented on a change in pull request #196: Use setScale() not round() when rounding BigDecimals URL: https://github.com/apache/incubator-daffodil/pull/196#discussion_r266064793
########## File path: daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/Functions.tdml ########## @@ -4324,6 +4324,8 @@ </xs:complexType> </xs:element> + <xs:element name="ceil08" type="xs:decimal" dfdl:inputValueCalc="{ fn:ceiling(xs:decimal(0.125)) }"/> Review comment: Grrrr. I guess I'm not surprised. Numbers are supposed to be immutable, so I'm very glad this is the case. (I think it was unwise to prefix the name with "set..." if it returns a new value. "rescale" would have been a perfectly good name. I guess whoever created the setScale() method got it through code-review without someone raising this objection. Oh well. ) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services