On Fri, 3 Apr 2026 18:19:56 GMT, Vicente Romero <[email protected]> wrote:

>> src/java.base/share/classes/java/time/chrono/HijrahDate.java line 667:
>> 
>>> 665:      */
>>> 666:     @java.io.Serial
>>> 667:     @SuppressWarnings("serial") // this method is not invoked for 
>>> value classes
>> 
>> Perhaps as future work, it would be technically possible for the serial lint 
>> checks to look inside the body of a method like this, notice the method 
>> always throws an exception, and elide the warning in that case. (It is a 
>> little unfortunate to "penalize" the java.time method for being robust in 
>> their serial handing by requiring new suppress warnings.)
>> 
>> Various known enhancements to the serial checking envision that deep 
>> inspection of lint checking, as in JDK-7019074.
>
> thanks @jddarcy, I have created: https://bugs.openjdk.org/browse/JDK-8381637 
> to address this issue. Are you OK with the PR?

Hmm, would it be easy for Javac to determine a method alwys finishes 
exceptionally?

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2187#discussion_r3034782194

Reply via email to