{
throw new ResourceLoadingException
("Invalid key: No resource-loader registered for schema: " + key.getSchema());
}
final ResourceDataCacheEntry cached = dataCache.get(key);
if (cached != null)
{
final ResourceData data = cached.getData();
// check, whether it is valid.
if (cached.getStoredVersion() < 0)
{
// a non versioned entry is always valid. (Maybe this is from a Jar-URL?)
return data;
}
final long version = data.getVersion(this);
if (version < 0)
{
// the system is no longer able to retrieve the version information?
// (but versioning information must have been available in the past)
// oh, that's bad. Assume the worst and re-read the data.
dataCache.remove(data);
}
else if (cached.getStoredVersion() == version)
{
return data;
}
else
{