RFR: 8229485: Add decrementExact(), incrementExact(), and negateExact() to java.lang.StrictMath
huizhe.wang at oracle.com
Wed Aug 14 19:45:18 UTC 2019
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.
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  and should have been added to java.lang.StrictMath for
> > 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
> >  https://bugs.openjdk.java.net/browse/JDK-8022109
More information about the core-libs-dev