On Fri, 6 Jan 2023 20:42:38 GMT, Phil Race <p...@openjdk.org> wrote:

> It is much better to have an error thrown which explains the problem rather 
> than a random NPE or similar right afterwards. 

But I assume we should have a test somewhere that validates that this option is 
not null = "is not optional"?
I make a quick search of code where we read the conf files, and it seems:
https://github.com/search?q=%22java.home%22+repo%3Aopenjdk%2Fjdk+path%3Asrc%2Fjava.desktop%2F+language%3AJava+language%3AJava&type=Code&ref=advsearch&l=Java&l=Java

 * The Sound - throw an exception in one place, but ignores the null in another 
place
 * The Fontconfig - throw an exception in FcFontConfiguration.java, but 
fallback to the empty code in SunFontManager.java
 * The Swing ignores the null property
 * The metal pipeline fallback to the empty path
 * The a11y code just read it as is.
 * The printers code in PSPrinterJob ignores the null

We have an opportunity to clean up all that code.

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

PR: https://git.openjdk.org/jdk/pull/11559

Reply via email to