On Wed, 19 Nov 2025 13:31:56 GMT, Chen Liang <[email protected]> wrote:
>> I went back through the nestmates design archives that I have to see if this >> particular issue was ever raised but I could not find it called out. I'm not >> a fan of explicit null checks as they penalize all the good code. I also >> don't think the inconsistency is/was an issue. If code does not need to use >> a parameter to complete its function then it also doesn't need to validate >> the unused parameter. YMMV. > > I think checking ahead is better. If we move c.isPrimitive call to be before > isPrimitive, the new consistent NPE becomes a compatibility risk. Better > perform checks early to prevent compatibility constraints. And I don't think > c is an unused parameter here. Yes you are right. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28336#discussion_r2544325718
