On Wed, 8 Feb 2023 18:39:42 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:

>> Hmm. Wouldn't hurt to do so.
>> 
>> I was thinking of making a pass over Fdlibm.java at some point to make sure 
>> the nested classes had package-level rather than public accessibility and 
>> that the classes had private constructors that threw an exception (to 
>> prevent instantiation).
>
> It doesn't matter much. It was just a drive-by comment; I don't normally look 
> at this part of the code but the PR title attracted my attention (it is not 
> everyday you see hyperbolic transcendental PRs in the JDK), and when I 
> skimmed through the code, some reflex part of my brain said "utility classes 
> should be final".

Changed the nested classes for the hyperbolic functions to be final and added a 
private constructor.

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

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

Reply via email to