Browse Source

Merge pull request #750 from 3863224zql/master

[fix] 解决潜在的空指针问题
bugfix
Jiaju Zhuang 5 years ago committed by GitHub
parent
commit
9c3afe2946
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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