Browse Source

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

bugfix
zhouqinglai 5 years ago
parent
commit
b1e12aa418
  1. 2
      src/main/java/com/alibaba/excel/context/WriteContextImpl.java

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

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

Loading…
Cancel
Save