Bugfix in ZUGFeRD2PullProvider.generateXML(): Test for valid value of getDueDate() before using it
or a NullPointerException might happen as 'hasDueDate==true' is not the result of a test to ensure that 'trans' overwrites 'getDueDate()' at all, so the default implementation from 'IZUGFeRDExportableTransaction' might get used which returns the unusable result 'null'.
This commit is contained in:
@@ -516,7 +516,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider {
|
||||
}
|
||||
}
|
||||
|
||||
if (hasDueDate) {
|
||||
if (hasDueDate && (trans.getDueDate()!=null)) {
|
||||
xml = xml + " <ram:DueDateDateTime><udt:DateTimeString format=\"102\">" // $NON-NLS-2$
|
||||
+ zugferdDateFormat.format(trans.getDueDate())
|
||||
+ "</udt:DateTimeString></ram:DueDateDateTime>\n";// 20130704 //$NON-NLS-1$
|
||||
|
||||
Reference in New Issue
Block a user