code: private static ClassLoader findClassLoader() throws ConfigurationError {
          // Figure out which ClassLoader to use for loading the provider
          // class.  If there is a Context ClassLoader then use it.
  
          ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
  
          if (debug) debugPrintln(
              "Using context class loader: "
              + classLoader);
  
          if (classLoader == null) {
              // if we have no Context ClassLoader
              // so use the current ClassLoader
              classLoader = FactoryFinder.class.getClassLoader();
              if (debug) debugPrintln(
                  "Using the class loader of FactoryFinder: "
                  + classLoader);
          }
  
          return classLoader;
      }
docs: <p>Find the appropriate <code>ClassLoader</code> to use.</p>
  
  <p>The context ClassLoader is preferred.</p>
  
  @return <code>ClassLoader</code> to use.
  
  @throws ConfigurationError If a valid <code>ClassLoader</code> cannot be identified.