code: public static ClassLoader getContextClassLoader(Class<?> contextClass) {
          return Objects.firstNonNull(
                  Thread.currentThread().getContextClassLoader(),
                  contextClass.getClassLoader()
          );
      }
docs: Returns current thread context class loader or context class's class loader
  
  @param contextClass context class to use
  @return the context class loader