Skip to content

Commit baaf5e6

Browse files
fix(lookup): handle null target values in XLS lookup table export
Write empty string instead of calling .as(String.class) on a null Value when exporting rows with no mapped target value. Fixes #959
1 parent 7613a4a commit baaf5e6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io/plugins/eu.esdihumboldt.hale.io.xls/src/eu/esdihumboldt/hale/io/xls/writer/XLSLookupTableWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ else if (getContentType().getId().equals("eu.esdihumboldt.hale.io.xls.xlsx")) {
133133

134134
Value entry = table.get(key);
135135
cell = row.createCell(1);
136-
cell.setCellValue(entry.as(String.class));
136+
cell.setCellValue((entry != null) ? entry.as(String.class) : "");
137137
cell.setCellStyle(rowStyle);
138138
rownum++;
139139
}

0 commit comments

Comments
 (0)