JEP 358 (Helpful NPEs) and single source file mode

Gunnar Morling gunnar at hibernate.org
Tue Nov 19 08:34:41 UTC 2019


Hi,

I've been exploring the new helpful NPE feature a bit.

It's a very welcomed improvement, but I noticed one potential usability
issue in conjunction with the single source file mode (JEP 330): as debug
info is missing in that case, e.g. local variables are rendered as
"<local1>" in the exception message. Single source file mode also doesn't
let me specify the "-g:vars" option I could use with javac for adding the
debugging info.

Perhaps single source file mode should add debug information by default to
prevent this issue?

Thanks,

--Gunnar


More information about the core-libs-dev mailing list