René Cordier created MIME4J-333:
-----------------------------------
Summary: Null when getting raw value of a field should be avoided
Key: MIME4J-333
URL: https://issues.apache.org/jira/browse/MIME4J-333
Project: James Mime4j
Issue Type: Improvement
Reporter: René Cordier
Returning null value on a get is a bad practice and a code smell. It can lead
to NullPointerException issues with code using those get methods.
One example is when using the DOM header field of the mime Message getRaw that
may return null.
When called and if it's null, we could lazily initialize it. But we should
ensure that it doesx exactly what DefaultMessageWriter does.
Add a few unit tests as well to prove it works as intended.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)