This commit is contained in:
Looly
2023-03-20 22:53:25 +08:00
parent 6060772c32
commit 248af7e2bc
6 changed files with 35 additions and 55 deletions

View File

@@ -26,7 +26,7 @@ public class DocUtil {
*/
public static XWPFDocument create(final File file) {
try {
return FileUtil.exist(file) ? new XWPFDocument(OPCPackage.open(file)) : new XWPFDocument();
return FileUtil.exists(file) ? new XWPFDocument(OPCPackage.open(file)) : new XWPFDocument();
} catch (final InvalidFormatException e) {
throw new POIException(e);
} catch (final IOException e) {