Skip to content

Commit

Permalink
close改为不抛出异常;
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouzhuo810 committed Oct 16, 2021
1 parent 8f804cc commit 8bd8b2c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 20 deletions.
3 changes: 1 addition & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Excel表格生成工具

```
dependencies {
implementation 'com.github.zhouzhuo810:ZzExcelCreator:1.0.8'
implementation 'com.github.zhouzhuo810:ZzExcelCreator:1.0.9'
}
```

Expand Down
4 changes: 2 additions & 2 deletions zz-excel-creator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 28
versionCode 8
versionName "1.7"
versionCode 9
versionName "1.8"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,10 @@ public String getCellContent(int col, int row) {

@Override
public void close() throws IOException, WriteException {
checkNullFirst();
writableWorkbook.write();
writableWorkbook.close();
if (writableWorkbook != null) {
writableWorkbook.write();
writableWorkbook.close();
}
writableWorkbook = null;
writableSheet = null;
}
Expand Down

0 comments on commit 8bd8b2c

Please sign in to comment.