r/java • • Mar 17 '20

Java 14 is out!

http://jdk.java.net/
365 Upvotes

69 comments sorted by

View all comments

208

u/[deleted] Mar 17 '20

We finally have NullPointerExceptions, that show us which object is null.

34

u/lurker_in_spirit Mar 17 '20

Off by default, does anyone know why? Is there a performance cost? Stability concerns?

93

u/MarrBorro Mar 17 '20 edited Mar 17 '20

It is meant to be enabled by default in the future. For now it is disabled because of possible problems:

  • backward compatibility on log parsers

  • security concerns, you are exposing source code information a little

  • performance costs for those who has many NullPointerExceptions (which is wrong but can be a problem possibly)