code: protected static ClassLoader getCurrentLoader(Object defaultObject)
      {
          ClassLoader loader = getContextClassLoader();
          
          if (loader == null)
          {
              loader = defaultObject.getClass().getClassLoader();
          }
          return loader;
      }
docs: Gets the ClassLoader associated with the current thread. Returns the class loader associated with the specified
  default object if no context loader is associated with the current thread.
  
  @param defaultObject
  The default object to use to determine the class loader (if none associated with current thread.)
  @return ClassLoader