RFR: 8301226: Add clamp() methods to java.lang.Math and to StrictMath [v2]

Tagir F. Valeev tvaleev at openjdk.org
Sat Feb 4 21:34:53 UTC 2023


On Sat, 4 Feb 2023 15:09:04 GMT, Emily <duke at openjdk.org> wrote:

>> Tagir F. Valeev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Typo in doc fixed
>
> src/java.base/share/classes/java/lang/Math.java line 2209:
> 
>> 2207:      * @param max maximal allowed value
>> 2208:      * @return a clamped value that fits into {@code min..max} interval
>> 2209:      * @throws IllegalArgumentException if {@code min < max}
> 
> Maybe I'm missing something but shouldn't this say `if {@code min > max}`? It's also repeated throughout the rest of the javadoc.

Indeed, a typo. Thanks!

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

PR: https://git.openjdk.org/jdk/pull/12428


More information about the core-libs-dev mailing list