Browse Source

[fix] 解决可能存在的空指针问题

pull/750/head
zhouqinglai 5 years ago
parent
commit
b1e12aa418
  1. 4
      src/main/java/com/alibaba/excel/context/WriteContextImpl.java

4
src/main/java/com/alibaba/excel/context/WriteContextImpl.java

@ -429,7 +429,9 @@ public class WriteContextImpl implements WriteContext {
OutputStream outputStream = encryptor.getDataStream(fileSystem);
opcPackage.save(outputStream);
} finally {
opcPackage.close();
if (opcPackage != null) {
opcPackage.close();
}
}
return fileSystem;
}

Loading…
Cancel
Save