On Sat, 18 Feb 2023 21:40:08 GMT, Tagir F. Valeev <tval...@openjdk.org> wrote:

>> For cleanup and dogfooding the new method, it would be nice to use 
>> Math.clamp where possible in java.base. See PR #12428.
>> 
>> As Math.clamp performs an additional check that min is not greater than max, 
>> I conservatively replaced only those occurrences where I can see that this 
>> invariant is always held. There are more occurrences, where clamp can be 
>> potentially used but it's unclear whether min <= max is always true.
>
> Tagir F. Valeev has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Revert changes in JrtPath, as it seems to be compiled with bootstrap JDK

I skimmed through the usages and they look okay. I didn't spot anywhere that it 
differs to the existing clamping. This is the first update in 2023 for some of 
these files so I assume you'll bump the copyright year before integrating.

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

Marked as reviewed by alanb (Reviewer).

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

Reply via email to