mirror of https://github.com/apache/poi.git
Replace "getEntry() plus catch" by "hasEntry()" in HSSFWorkbook
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1809738 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2a04408bf3
commit
9bb3e05e6a
|
@ -271,13 +271,9 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss
|
|||
}
|
||||
|
||||
public static String getWorkbookDirEntryName(DirectoryNode directory) {
|
||||
|
||||
for(String wbName : WORKBOOK_DIR_ENTRY_NAMES) {
|
||||
try {
|
||||
directory.getEntry(wbName);
|
||||
if(directory.hasEntry(wbName)) {
|
||||
return wbName;
|
||||
} catch (FileNotFoundException e) {
|
||||
// continue - to try other options
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue