Skip to content

Commit 0926b39

Browse files
author
杨利兵
committed
读取配置信息时不存在的Sheet不报错
1 parent a54c44a commit 0926b39

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/com/yanglb/utilitys/codegen/core/reader/BaseReader.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,9 @@ private void doReader() throws CodeGenException {
144144
// 读取指定的Sheet
145145
for(String sheetName:this.sheets) {
146146
XSSFSheet sheet = wb.getSheet(sheetName);
147-
if(sheet == null) {
148-
throw new CodeGenException(String.format(MsgUtility.getString("E_004"), sheetName));
147+
if(sheet != null) {
148+
this.results.add(this.onReader(sheet));
149149
}
150-
this.results.add(this.onReader(sheet));
151150
}
152151
}
153152
} catch (FileNotFoundException e) {

0 commit comments

Comments
 (0)