RFR: 8229485: Add decrementExact(), incrementExact(), and negateExact() to java.lang.StrictMath
Julia Boes
julia.boes at oracle.com
Wed Aug 21 13:29:05 UTC 2019
Hi all,
Thanks for the review. I incorporated the following changes:
- added "@since 14" tag
- removed test code from the CSR specification
- minor fixes in StrictMath.java, ExactArithTests.java as per Ivan's
comments. The related fix in Math.java is included in this CSR:
https://bugs.openjdk.java.net/browse/JDK-8229473
Updated webrev:
http://cr.openjdk.java.net/~dfuchs/jboes/8229485/webrev.02/index.html
Regards,
Julia
On 14/08/2019 20:45, Joe Wang wrote:
> Hi Daniel,
>
> That makes sense. So it meant to say "converts the long to int only if
> it's within the range of an integer" (to be "exact"). It may then add
> "throws an exception if not". But the original is fine, just my 2 cents.
>
> Best,
> Joe
>
> On 8/14/19 12:21 PM, Daniel Fuchs wrote:
>> Hi Joe,
>>
>> On 14/08/2019 20:15, Joe Wang wrote:
>>> The 2nd part is not necessary as that's what the "@throws" tag is for.
>>
>> Not withstanding the fact that this is a copy of the API doc from
>> java.lang.Math, I'd argue that the second part is quite important.
>> It's why the method is called exact, and is probably the only
>> reason why you would call that method in the first place.
>> So I think the 2nd part must be in the synopsis too.
>>
>> best regards,
>>
>> -- daniel
>>
>> On 8/14/19 9:01 AM, Julia Boes wrote:
>> >
>> > Hi,
>> >
>> > This fix adds decrementExact(), incrementExact(), and negateExact()
>> to java.lang.StrictMath. The methods were added to java.lang.Math
>> previously [1] and should have been added to java.lang.StrictMath for
>> consistency.
>> >
>> > Bug: https://bugs.openjdk.java.net/browse/JDK-8229485
>> >
>> > Webrev: http://cr.openjdk.java.net/~dfuchs/jboes/8229485/webrev.01/
>> >
>> > CSR: https://bugs.openjdk.java.net/browse/JDK-8229702
>> >
>> > Thanks,
>> >
>> > Julia
>> >
>> > [1] https://bugs.openjdk.java.net/browse/JDK-8022109
>
More information about the core-libs-dev
mailing list