Merge pull request #473 from J-N-K/fix-usoe
Fix UnsupportedOperationException in buildNotes
This commit is contained in:
@@ -897,8 +897,9 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected String buildNotes(IExportableTransaction exportableTransaction) {
|
protected String buildNotes(IExportableTransaction exportableTransaction) {
|
||||||
final List<IncludedNote> includedNotes = Optional.ofNullable(exportableTransaction.getNotesWithSubjectCode())
|
final List<IncludedNote> includedNotes = new ArrayList<>();
|
||||||
.orElse(new ArrayList<>());
|
Optional.ofNullable(exportableTransaction.getNotesWithSubjectCode()).ifPresent(includedNotes::addAll);
|
||||||
|
|
||||||
if (exportableTransaction.getNotes() != null) {
|
if (exportableTransaction.getNotes() != null) {
|
||||||
for (final String currentNote : exportableTransaction.getNotes()) {
|
for (final String currentNote : exportableTransaction.getNotes()) {
|
||||||
includedNotes.add(IncludedNote.unspecifiedNote(currentNote));
|
includedNotes.add(IncludedNote.unspecifiedNote(currentNote));
|
||||||
|
|||||||
Reference in New Issue
Block a user