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
991fba37a2
commit
a751880c11
@ -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);
|
||||
for(String wbName : WORKBOOK_DIR_ENTRY_NAMES) {
|
||||
if(directory.hasEntry(wbName)) {
|
||||
return wbName;
|
||||
} catch (FileNotFoundException e) {
|
||||
// continue - to try other options
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user