docs: @SuppressWarnings("unchecked")
      public static <T> ThreadLocalProxy<T> createThreadLocalProxy(Class<T> type) {
          ThreadLocalProxy<?> proxy = null;
          if (UriInfo.class.isAssignableFrom(type)) {
              proxy = new ThreadLocalUriInfo();
          } else if (HttpHeaders.class.isAssignableFrom(type)) {
              proxy = new ThreadLocalHttpHeaders();
          } else if (ProtocolHeaders.class.isAssignableFrom(type)) {
              proxy = new ThreadLocalProtocolHeaders();
          } else if (SecurityContext.class.isAssignableFrom(type)) {
              proxy = new ThreadLocalSecurityContext();
          } else if (ContextResolver.class.isAssignableFrom(type)) {
              proxy = new ThreadLocalContextResolver<>();
          } else if (Request.class.isAssignableFrom(type)) {
              proxy = new ThreadLocalRequest();
          } else if (Providers.class.isAssignableFrom(type)) {
              proxy = new ThreadLocalProviders();
          } else if (MessageContext.class.isAssignableFrom(type)) {
              proxy = new ThreadLocalMessageContext();
  // Liberty Change for CXF Begin
          } else if (type.getName().equals(MessageContext.class.getName())) {
              MessageContextProxyClassLoader loader = new MessageContextProxyClassLoader(getClassLoader(Proxy.class), getClassLoader(type), getClassLoader(ThreadLocalProxy.class));
              proxy = (ThreadLocalProxy<T>) Proxy.newProxyInstance(loader,
                                                                   new Class[] { type, ThreadLocalProxy.class },
                                                                   new ProxyInvocationHandler(new ThreadLocalMessageContext()));
  // Liberty Change for CXF Begin
          }
  
          if (proxy == null && isServletApiContext(type.getName())) {
              proxy = createThreadLocalServletApiContext(type.getName());
          }
          if (proxy == null) {
              ClassLoader loader
                  = proxyClassLoaderCache.getProxyClassLoader(Proxy.class.getClassLoader(), 
                                                              new Class<?>[]{Proxy.class, ThreadLocalProxy.class, type}); 
              if (!canSeeAllClasses(loader, new Class<?>[]{Proxy.class, ThreadLocalProxy.class, type})) {
                  // Liberty change start - (LOG to Tr)
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "find a loader from ProxyClassLoader cache," 
                          + " but can't see all interfaces");
                  
                      Tr.debug(tc, "create a new one with parent  " + Proxy.class.getClassLoader());
                  }
                  //Liberty change end
                  proxyClassLoaderCache.removeStaleProxyClassLoader(type);
                  proxyClassLoaderCache.getProxyClassLoader(Proxy.class.getClassLoader(), 
                                                            new Class<?>[]{Proxy.class, ThreadLocalProxy.class, type}); 
              }
              return (ThreadLocalProxy<T>)Proxy.newProxyInstance(loader,
                                                       new Class[] {type, ThreadLocalProxy.class },
                                                       new ThreadLocalInvocationHandler<T>());
          }
  
          return (ThreadLocalProxy<T>) proxy;
      }