[ 
https://issues.apache.org/jira/browse/OFBIZ-11862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacques Le Roux closed OFBIZ-11862.
-----------------------------------
    Fix Version/s: 18.12.01
         Assignee: Jacques Le Roux
       Resolution: Fixed

> BigDecimal casting in Groovy
> ----------------------------
>
>                 Key: OFBIZ-11862
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11862
>             Project: OFBiz
>          Issue Type: Bug
>          Components: bi, order, product
>    Affects Versions: Trunk
>            Reporter: Jacques Le Roux
>            Assignee: Jacques Le Roux
>            Priority: Major
>             Fix For: 18.12.01
>
>
> [Pritam Kute 
> noticed|https://issues.apache.org/jira/browse/OFBIZ-11843?focusedCommentId=17146911&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17146911]
>  in OFBIZ-11843 that we sometimes use wrong type castings for BigDecimal:
> {quote}
> I have observed that for typecasting in groovy, we have used the wrong coding 
> pattern like
> {code:java}
> (BigDecimal) -0.01
> {code}
> It should be like
> {code:java}
> -0.01 as BigDecimal
> {code}
> {quote}
> Actually in this case we don't need to cast, [because in case of decimal, the 
> default type is always 
> BigDecimal|https://www.logicbig.com/tutorials/misc/groovy/numbers-types-suffix.html].
>  
> But there are Integers in trunk (mostly 0) and 2 cases where it's useless to 
> cast in R18, nothing in R17



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to