String redirectedLibraryName = resolveLibraryName(expectedLibraryName);
// check cache
if(getResourceLoaderCache().containsResource(resourceName, redirectedLibraryName, contentType, localePrefix))
{
ResourceValue resourceValue = getResourceLoaderCache().getResource(
resourceName, redirectedLibraryName, contentType, localePrefix);
//resource = new ResourceImpl(resourceValue.getResourceMeta(), resourceValue.getResourceLoader(),
// getResourceHandlerSupport(), contentType);
resource = new ExtendedResourceImpl((ExtendedResourceMeta) resourceValue.getResourceMeta(),
resourceValue.getResourceLoader(),
getResourceHandlerSupport(),
contentType, localePrefix,
redirectedLibraryName.equals(expectedLibraryName) ? null : expectedLibraryName);
}
else