以下代码来自java.sql.DriverManager:
public static Connection getConnection(String url,String user, String password)    {
    // Gets the classloader of the code that called this method, may 
    // be null.
    ClassLoader callerCL = DriverManager.getCallerClassLoader();
    return (getConnection(url, info, callerCL));
 }
我的第一个问题是为什么结果值DriverManager.getCallerClassLoader();可能为空?我认为调用者类应该是用户自己的类,通常是AppClassLoader。
上述代码的子序列,getConnection(url, info, callerCL)方法体包含以下代码片段。
if(callerCL == null) {
    callerCL = Thread.currentThread().getContextClassLoader();
}    
有什么Thread.currentThread().getContextClassLoader()用?我浏览了文档,无法理解。
谢谢。