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
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
https://codereview.appspot.com/321030043/diff/1/icu4j/main/classes/core/src/c...
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/c...
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 wrote:
> Is it possible for the conversion to ICU big decimal to fail with a Java big
> decimal with a scale of 0 and an insane number of zeros?
I think it is OK. The following code works fine.
public static void main(String[] args) throws ParseException {
java.math.BigDecimal src = new java.math.BigDecimal("1");
src = src.scaleByPowerOfTen(10000);
src = src.setScale(0);
System.out.println(src);
com.ibm.icu.math.BigDecimal d = new com.ibm.icu.math.BigDecimal(src);
System.out.println(d);
}
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
Message was sent while issue was closed.
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?
On 2017/06/12 20:18:21, andy.heninger wrote: > On 2017/05/26 23:59:33, sffc wrote: > > Committed revision ...
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.
Issue 321030043: ticket:13205 Prevent exception from being thrown when parsing numbers with very large exponents.
(Closed)
Created 6 years, 10 months ago by sffc
Modified 6 years, 9 months ago
Reviewers: andy.heninger
Base URL: svn+icussh://source.icu-project.org/repos/icu/trunk/
Comments: 2