#771: Added null check to prevent NullPointerException on Product Description

This commit is contained in:
itomic
2025-03-26 13:46:25 +01:00
parent 3f22945492
commit b2917ed742

View File

@@ -450,7 +450,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
} }
xml += "<ram:Name>" + XMLTools.encodeXML(currentItem.getProduct().getName()) + "</ram:Name>"; xml += "<ram:Name>" + XMLTools.encodeXML(currentItem.getProduct().getName()) + "</ram:Name>";
if (currentItem.getProduct().getDescription().length() > 0) { if (currentItem.getProduct().getDescription() != null && currentItem.getProduct().getDescription().length() > 0) {
xml += "<ram:Description>" + xml += "<ram:Description>" +
XMLTools.encodeXML(currentItem.getProduct().getDescription()) + XMLTools.encodeXML(currentItem.getProduct().getDescription()) +
"</ram:Description>"; "</ram:Description>";