<i18n dev> RFR: 8331485: Odd Results when Parsing Scientific Notation with Large Exponent [v2]

Justin Lu jlu at openjdk.org
Fri May 3 18:29:23 UTC 2024


On Fri, 3 May 2024 18:24:31 GMT, Justin Lu <jlu at openjdk.org> wrote:

>> src/java.base/share/classes/java/text/DecimalFormat.java line 2596:
>> 
>>> 2594:                             exponent = -exponent;
>>> 2595:                         }
>>> 2596:                         sawExponent = true;
>> 
>> I see you removed this assignment. I am wondering if we need this variable at all.
>
> Should be updated in the latest commit, I had forgotten to remove the assignment as well as the check. As we always `break` once we parse the exponent, we have no need for the boolean flag. Thanks for the review!

Perhaps there was a planned reason for it before, but as it stands it serves no purpose, so until there is a reason to have it, I think we can safely remove it to de-clutter the code.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19075#discussion_r1589588844


More information about the i18n-dev mailing list