You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Catherine Hope (JIRA)" <ji...@apache.org> on 2009/07/13 19:21:15 UTC
[jira] Created: (HARMONY-6271) [classlib][math] BigDecimal.divide
should throw an ArithmeticException instead of OutOfMemory for too large
scales
[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
Priority: Minor
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.
[jira] Updated: (HARMONY-6271) [classlib][math] BigDecimal.divide
should throw an ArithmeticException instead of OutOfMemory for too large
scales
Posted by "Catherine Hope (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Catherine Hope updated HARMONY-6271:
------------------------------------
Attachment: 6271-patch.txt
Fix testcase error
> [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.
[jira] Updated: (HARMONY-6271) [classlib][math] BigDecimal.divide
should throw an ArithmeticException instead of OutOfMemory for too large
scales
Posted by "Catherine Hope (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Catherine Hope updated HARMONY-6271:
------------------------------------
Attachment: bigdecimal-patch.txt
Fix simply to change the OutOfMemoryError to an ArithmeticException (the error message remains the same as this shouldn't be matched).
Test added to BigIntegerDivideTest.java (testCase25)
> [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
> Priority: Minor
> Attachments: 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.
[jira] Commented: (HARMONY-6271) [classlib][math] BigDecimal.divide
should throw an ArithmeticException instead of OutOfMemory for too large
scales
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Updated: (HARMONY-6271) [classlib][math] BigDecimal.divide
should throw an ArithmeticException instead of OutOfMemory for too large
scales
Posted by "Catherine Hope (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Catherine Hope updated HARMONY-6271:
------------------------------------
Attachment: bigdecimal-patch.txt
Please ignore previous patch - I added the testcase to the wrong junit class. Now moved in org.apache.harmony.tests.java.math.BigDecimalArithmeticTest
> [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
> Priority: Minor
> Attachments: 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.
[jira] Closed: (HARMONY-6271) [classlib][math] BigDecimal.divide
should throw an ArithmeticException instead of OutOfMemory for too large
scales
Posted by "Catherine Hope (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Assigned: (HARMONY-6271) [classlib][math] BigDecimal.divide
should throw an ArithmeticException instead of OutOfMemory for too large
scales
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Hindess reassigned HARMONY-6271:
-------------------------------------
Assignee: Mark Hindess
> [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: 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.
[jira] Commented: (HARMONY-6271) [classlib][math] BigDecimal.divide
should throw an ArithmeticException instead of OutOfMemory for too large
scales
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735613#action_12735613 ]
Mark Hindess commented on HARMONY-6271:
---------------------------------------
When I run this test on Sun 1.5 and Sun 6.0 (linux/x86_64) I get a NegativeArraySizeException rather than ArithmeticException. Perhaps we should follow RI behaviour? Having said that ArithmeticException does seem more appropriate.
> [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: 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.
[jira] Resolved: (HARMONY-6271) [classlib][math] BigDecimal.divide
should throw an ArithmeticException instead of OutOfMemory for too large
scales
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Hindess resolved HARMONY-6271.
-----------------------------------
Resolution: Fixed
Fix Version/s: 5.0M11
> [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.