code: protected Class loadClass(String className) {
          try {
              return getClass().getClassLoader().loadClass(className);
          } catch (Exception e) {
              //ignore and fallback to TCCL
          }
  
          try {
              if (Thread.currentThread().getContextClassLoader() != null)
              return Thread.currentThread().getContextClassLoader().loadClass(className);
          } catch (Exception e) {
              //ignore and fallback to TCCL
          }
          throw new IllegalStateException("Failed to load class: ["+className+"].");
      }
docs: Try to load a class using the current classloader (the one that loaded this class)
  or the thread context class loader.
  @param className The name of the class.
  @return          The class of throws IllegalStateException.