From a29febded2fae4a486cd3ab4740d296a6e9d628b Mon Sep 17 00:00:00 2001 From: xiaoshu-zhao Date: Sat, 2 Mar 2024 05:46:04 -0800 Subject: [PATCH] fix the NullPointerException issue. for issue detail please check https://github.com/opensagres/xdocreport/issues/637 --- .../opensagres/poi/xwpf/converter/core/ListItemContext.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/thirdparties-extension/fr.opensagres.poi.xwpf.converter.core/src/main/java/fr/opensagres/poi/xwpf/converter/core/ListItemContext.java b/thirdparties-extension/fr.opensagres.poi.xwpf.converter.core/src/main/java/fr/opensagres/poi/xwpf/converter/core/ListItemContext.java index 5451a4b2d..eb0bf2645 100644 --- a/thirdparties-extension/fr.opensagres.poi.xwpf.converter.core/src/main/java/fr/opensagres/poi/xwpf/converter/core/ListItemContext.java +++ b/thirdparties-extension/fr.opensagres.poi.xwpf.converter.core/src/main/java/fr/opensagres/poi/xwpf/converter/core/ListItemContext.java @@ -143,6 +143,10 @@ public boolean isRoot() public String getText() { + if (lvl == null || lvl.getLvlText() == null) { + return ""; + } + String text = lvl.getLvlText().getVal(); CTNumFmt numFmt = lvl.getNumFmt();