[ https://issues.apache.org/jira/browse/HARMONY-6271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Catherine Hope closed HARMONY-6271. ----------------------------------- Verified > [classlib][math] BigDecimal.divide should throw an ArithmeticException instead of OutOfMemory for too large scales > ------------------------------------------------------------------------------------------------------------------ > > Key: HARMONY-6271 > URL: https://issues.apache.org/jira/browse/HARMONY-6271 > Project: Harmony > Issue Type: Bug > Components: Classlib > Environment: all > Reporter: Catherine Hope > Assignee: Mark Hindess > Priority: Minor > Fix For: 5.0M11 > > Attachments: 6271-patch.txt, bigdecimal-patch.txt, bigdecimal-patch.txt > > > BigDecimal.divide should throw an ArithmeticException instead of OutOfMemory when called with a scale that can't be satisfied with the available memory. The exception defined in the specification is: > "throws ArithmeticException - if divisor is zero, roundingMode==RoundingMode.UNNECESSARY and the specified scale is insufficient to represent the result of the division exactly." > Which doesn't say what to do in this precise occurrence (though it doesn't say it may throw an OutOfMemoryError), but both Sun and IBM Java implementations have this behaviour. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.