Describe the feature
Currently, the default value of the configuration setting lombok.nonNull.exceptionType is NullPointerException
This issue proposed that when targeting Java >= 9, the default value of lombok.nonNull.exceptionType be JDK
Describe the target audience
The current default, NullPointerException, generates if statements which results in lots of branches. Code coverage tools, such as JaCoCo, see these branches and will require tests for each one in order for the code to be considered covered.
JDK doesn't generate any branches. Therefore, code coverage tools "just work" the way developers expect.
Instead of requiring all developers to realize this situation, it would be better to have lombok automatically use the best default configuration based on the version of java targeted.
Before submitting :+1:
Describe the feature Currently, the default value of the configuration setting
lombok.nonNull.exceptionType
isNullPointerException
This issue proposed that when targeting Java >= 9, the default value of
lombok.nonNull.exceptionType
beJDK
Describe the target audience The current default,
NullPointerException
, generatesif
statements which results in lots of branches. Code coverage tools, such as JaCoCo, see these branches and will require tests for each one in order for the code to be considered covered.JDK
doesn't generate any branches. Therefore, code coverage tools "just work" the way developers expect.Instead of requiring all developers to realize this situation, it would be better to have lombok automatically use the best default configuration based on the version of java targeted.