harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Hindess (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6271) [classlib][math] BigDecimal.divide should throw an ArithmeticException instead of OutOfMemory for too large scales
Date Tue, 28 Jul 2009 11:13:14 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736035#action_12736035
] 

Mark Hindess commented on HARMONY-6271:
---------------------------------------

Applied patch in r798486.  Please confirm by closing this JIRA that the patch was applied
as expected.


> [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
>         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.


Mime
View raw message