On Fri, 13 Oct 2023 09:33:28 GMT, Raffaello Giulietti <[email protected]>
wrote:
>> Aggelos Biboudis has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix duplicate method name and add a new test in
>> PrimitivePatternsSwitchErrors
>
> src/java.base/share/classes/java/lang/runtime/ExactConversionsSupport.java
> line 51:
>
>> 49: *
>> 50: * */
>> 51: public static boolean intToByteExact(int n) {return n ==
>> (int)(byte)n;}
>
> These ones seem more _conversions_ than _tests_.
> To me, `intToByteExact(int)` looks more like a request to convert an `int` to
> a `byte`, rather than a check to see whether the argument lies in the `byte`
> range.
> Pure methods returning `boolean` are often named like `isIntToByteExact(int)`
> or the like (`is*()`, `has*()`, etc.)
>
> I know: choosing good, speaking, and evocative names is one of the hardest
> problem in computer science.
Good recommendation. Names updated!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15638#discussion_r1361013093