Updatest to NPE
diff --git a/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/SpreadsheetSerializer.java b/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/SpreadsheetSerializer.java
index bdf81fd..78fe98d 100644
--- a/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/SpreadsheetSerializer.java
+++ b/cda/plugins/org.eclipse.mdht.cda.xml.ui/src/org/eclipse/mdht/cda/xml/ui/handlers/SpreadsheetSerializer.java
@@ -1703,50 +1703,59 @@
static int serializeCompleteDate(Row row, int offset, IVL_TS effectiveTime) {
- if (effectiveTime.getValue() != null) {
+ if (effectiveTime != null) {
+ if (effectiveTime.getValue() != null) {
- Date effectiveDate = CDAValueUtil.getDate(effectiveTime.getValue());
- if (effectiveDate != null) {
- row.createCell(offset++).setCellValue(CDAValueUtil.DATE_PRETTY.format(effectiveDate));
+ Date effectiveDate = CDAValueUtil.getDate(effectiveTime.getValue());
+ if (effectiveDate != null) {
+ row.createCell(offset++).setCellValue(CDAValueUtil.DATE_PRETTY.format(effectiveDate));
+ } else {
+ row.createCell(offset++).setCellValue("");
+ }
+ row.createCell(offset++).setCellValue(CDAUtil.getDomainPath(effectiveTime));
} else {
row.createCell(offset++).setCellValue("");
+ row.createCell(offset++).setCellValue(CDAUtil.getDomainPath(effectiveTime));
}
- row.createCell(offset++).setCellValue(CDAUtil.getDomainPath(effectiveTime));
- } else {
- row.createCell(offset++).setCellValue("");
- row.createCell(offset++).setCellValue(CDAUtil.getDomainPath(effectiveTime));
- }
- if (effectiveTime.getLow() != null) {
+ if (effectiveTime.getLow() != null) {
- Date effectiveDateLow = CDAValueUtil.getDate(effectiveTime.getLow().getValue());
- if (effectiveDateLow != null) {
- row.createCell(offset++).setCellValue(CDAValueUtil.DATE_PRETTY.format(effectiveDateLow));
+ Date effectiveDateLow = CDAValueUtil.getDate(effectiveTime.getLow().getValue());
+ if (effectiveDateLow != null) {
+ row.createCell(offset++).setCellValue(CDAValueUtil.DATE_PRETTY.format(effectiveDateLow));
+ } else {
+ row.createCell(offset++).setCellValue("");
+ }
+ row.createCell(offset++).setCellValue(CDAUtil.getDomainPath(effectiveTime.getLow()));
+
} else {
row.createCell(offset++).setCellValue("");
+ row.createCell(offset++).setCellValue(CDAUtil.getDomainPath(effectiveTime));
+
}
- row.createCell(offset++).setCellValue(CDAUtil.getDomainPath(effectiveTime.getLow()));
- } else {
- row.createCell(offset++).setCellValue("");
- row.createCell(offset++).setCellValue(CDAUtil.getDomainPath(effectiveTime));
+ if (effectiveTime.getHigh() != null) {
- }
+ Date effectiveDateHigh = CDAValueUtil.getDate(effectiveTime.getHigh().getValue());
+ if (effectiveDateHigh != null) {
+ row.createCell(offset++).setCellValue(CDAValueUtil.DATE_PRETTY.format(effectiveDateHigh));
+ } else {
+ row.createCell(offset++).setCellValue("");
+ }
- if (effectiveTime.getHigh() != null) {
-
- Date effectiveDateHigh = CDAValueUtil.getDate(effectiveTime.getHigh().getValue());
- if (effectiveDateHigh != null) {
- row.createCell(offset++).setCellValue(CDAValueUtil.DATE_PRETTY.format(effectiveDateHigh));
+ row.createCell(offset++).setCellValue(CDAUtil.getDomainPath(effectiveTime.getHigh()));
} else {
row.createCell(offset++).setCellValue("");
- }
+ row.createCell(offset++).setCellValue(CDAUtil.getDomainPath(effectiveTime));
- row.createCell(offset++).setCellValue(CDAUtil.getDomainPath(effectiveTime.getHigh()));
+ }
} else {
row.createCell(offset++).setCellValue("");
- row.createCell(offset++).setCellValue(CDAUtil.getDomainPath(effectiveTime));
-
+ row.createCell(offset++).setCellValue("");
+ row.createCell(offset++).setCellValue("");
+ row.createCell(offset++).setCellValue("");
+ row.createCell(offset++).setCellValue("");
+ row.createCell(offset++).setCellValue("");
}
return offset;