Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(802)

Issue 321030043: ticket:13205 Prevent exception from being thrown when parsing numbers with very large exponents. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
6 years, 10 months ago by sffc
Modified:
6 years, 9 months ago
Reviewers:
andy.heninger
CC:
markus.icu
Base URL:
svn+icussh://source.icu-project.org/repos/icu/trunk/
Visibility:
Public.

Description

ticket:13205 Prevent exception from being thrown when parsing numbers with very large exponents.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -2 lines) Patch
M icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java View 3 chunks +25 lines, -2 lines 2 comments Download
M icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatTest.java View 1 chunk +27 lines, -0 lines 0 comments Download

Messages

Total messages: 6
sffc
6 years, 10 months ago (2017-05-20 02:13:30 UTC) #1
andy.heninger
LGTM https://codereview.appspot.com/321030043/diff/1/icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java File icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java (right): https://codereview.appspot.com/321030043/diff/1/icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java#newcode2448 icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java:2448: private Number safeConvertBigDecimal(java.math.BigDecimal number) { Is it possible ...
6 years, 10 months ago (2017-05-23 18:37:41 UTC) #2
sffc
https://codereview.appspot.com/321030043/diff/1/icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java File icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java (right): https://codereview.appspot.com/321030043/diff/1/icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java#newcode2448 icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java:2448: private Number safeConvertBigDecimal(java.math.BigDecimal number) { On 2017/05/23 18:37:40, andy.heninger ...
6 years, 10 months ago (2017-05-26 22:44:23 UTC) #3
sffc
Committed revision 40141.
6 years, 10 months ago (2017-05-26 23:59:33 UTC) #4
andy.heninger
On 2017/05/26 23:59:33, sffc wrote: > Committed revision 40141. Should the API description for parse() ...
6 years, 9 months ago (2017-06-12 20:18:21 UTC) #5
sffc
6 years, 9 months ago (2017-06-15 02:03:28 UTC) #6
Message was sent while issue was closed.
On 2017/06/12 20:18:21, andy.heninger wrote:
> On 2017/05/26 23:59:33, sffc wrote:
> > Committed revision 40141.
> 
> Should the API description for parse() be updated to say that infinities or
> negative 0 can be returned?

The main parse function says:

Returns a Long if possible (e.g., within the range [Long.MIN_VALUE,
Long.MAX_VALUE] and with no decimals), otherwise a Double.

The description is unchanged from ICU 58.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b