On Fri, 6 Jan 2023 00:49:58 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

> If this property is not optional why do we have a null check for it? Can that 
> check be removed as a part of refactoring?

It is much better to have an error thrown which explains the problem rather 
than a random NPE or similar right afterwards.
This behaviour has been there since at least JDK 1.3 (2000)  when the file was 
first created as sun/awt/FontProperties.java. It may even have existed in some 
other location before then, but I can't tell that from SCCS per-file history.

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

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

Reply via email to