mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复某些数据库的getParameterMetaData会返回NULL,导致空指针的问题。(pr#3936@Github)
This commit is contained in:
@@ -643,7 +643,9 @@ public class StatementWrapper extends SimpleWrapper<PreparedStatement> implement
|
|||||||
final ParameterMetaData pmd;
|
final ParameterMetaData pmd;
|
||||||
try {
|
try {
|
||||||
pmd = this.raw.getParameterMetaData();
|
pmd = this.raw.getParameterMetaData();
|
||||||
sqlType = pmd.getParameterType(paramIndex);
|
if(null != pmd){
|
||||||
|
sqlType = pmd.getParameterType(paramIndex);
|
||||||
|
}
|
||||||
} catch (final SQLException ignore) {
|
} catch (final SQLException ignore) {
|
||||||
// ignore
|
// ignore
|
||||||
// log.warn("Null param of index [{}] type get failed, by: {}", paramIndex, e.getMessage());
|
// log.warn("Null param of index [{}] type get failed, by: {}", paramIndex, e.getMessage());
|
||||||
|
Reference in New Issue
Block a user