On Thu, 8 May 2025 16:01:51 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

>> Chen Liang has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Update src/java.base/share/classes/java/lang/ClassValue.java
>>   
>>   Co-authored-by: Shaojin Wen <shaojin.we...@alibaba-inc.com>
>
> src/java.base/share/classes/java/lang/ClassValue.java line 241:
> 
>> 239:                 } else {
>> 240:                     throw ex instanceof Error err ? err : new Error(ex);
>> 241:                 }
> 
> Hello Chen, i think this if/else for exception type checks can instead just 
> be replaced with an unconditional `throw ex`;

I tried that and failed compilation before

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24043#discussion_r2080032029

Reply via email to