docs: @SuppressWarnings("unchecked")
    public synchronized static <T> T resolve(Class<T> c, Class<? extends T> defaultImpl) {
      if (providers.containsKey(c)) {
        return (T) providers.get(c);
      }
      try {
        String _className = readFile("org/cache2k/services/" + c.getName());
        T obj = null;
        if (_className == null) {
          ServiceLoader<T> sl = ServiceLoader.load(c);
          Iterator<T> it = sl.iterator();
          if (it.hasNext()) {
            obj = it.next();
          }
        } else {
          obj = (T) SingleProviderResolver.class.getClassLoader().loadClass(_className).newInstance();
        }
        if (obj == null && defaultImpl != null) {
          obj = defaultImpl.newInstance();
        }
        providers.put(c, obj);
        return obj;
      } catch (Exception ex) {
        Error err = new LinkageError("Error instantiating " + c.getName(), ex);
        err.printStackTrace();
        throw err;
      }
    }