On Wed, 8 Oct 2025 08:05:22 GMT, Alan Bateman <[email protected]> wrote:

> > > I think what you are suggesting is that the JEP could instead have 
> > > -Xcheck:jni emit a warning when JNI setter functions mutate final fields, 
> > > and maybe change it to be a fatal error in the future, maybe as part of 
> > > the future JEP that proposes to move "deny" the default.
> > 
> > 
> > @AlanBateman yes that is exactly what I am suggesting. Thanks
> 
> I discussed this with Ron. Mutating final fields from native code isn't core 
> to this JEP. A fatal error would be better but we are okay with it initially 
> being a warning instead. So we'll update that section of the JEP, and change 
> the addition to jniCheck to use ReportJNIWarning instead of 
> ReportJNIFatalError.

Thank you @AlanBateman and @pron !

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

PR Comment: https://git.openjdk.org/jdk/pull/25115#issuecomment-3383789373

Reply via email to