-
Notifications
You must be signed in to change notification settings - Fork 13k
Description
Hello,
Our static analyzer found a following potential NPE. We have checked the feasibility of this execution trace. It is necessary to defend this vulnerability to improve the code quality.
-
Select the true branch at this point (
class.equals(class)!=0
is true)
} else if (!handler.getClass().equals(soleHandler.getClass())) { -
Select the true branch at this point (
jdbcHandlerMap.values().iterator().hasNext()==0
is true)
for (TypeHandler<?> handler : jdbcHandlerMap.values()) { -
Return soleHandler to caller, which can be null (The return value can be null)
return soleHandler; -
Function pickSoleHandler executes and returns
handler = pickSoleHandler(jdbcHandlerMap); -
Return handler to caller, which can be null (The return value can be null)
return (TypeHandler<T>) handler; -
Return the return value of function getTypeHandler to caller
return getTypeHandler((Type) type, null); -
Function getTypeHandler executes and stores the return value to typehandler (typehandler can be null)
typeHandler = typeHandlerRegistry.getTypeHandler(Object.class); -
Function add executes and typeHandlers contains null
typeHandlers.add(typeHandler); -
Function get executes and stores the return value to handler (handler can be null)
TypeHandler<?> handler = typeHandlers.get(i); -
handler is passed as the this pointer to function getResult (handler can be null), which will leak to null pointer dereference
row.put(name.toUpperCase(Locale.ENGLISH), handler.getResult(rs, name));
Commit: b459c61
ContainerAnalyzer