修复NoSuchMethodError未捕获问题

This commit is contained in:
Looly
2023-03-09 20:02:22 +08:00
parent 50c07dd4d8
commit dc5992b139
2 changed files with 8 additions and 8 deletions

View File

@@ -5,7 +5,7 @@ import cn.hutool.core.util.ClassLoaderUtil;
/**
* POI引入检查器
*
*
* @author looly
* @since 4.0.10
*/
@@ -20,7 +20,7 @@ public class PoiChecker {
public static void checkPoiImport() {
try {
Class.forName("org.apache.poi.ss.usermodel.Workbook", false, ClassLoaderUtil.getClassLoader());
} catch (ClassNotFoundException | NoClassDefFoundError e) {
} catch (ClassNotFoundException | NoClassDefFoundError | NoSuchMethodError e) {
throw new DependencyException(e, NO_POI_ERROR_MSG);
}
}