* @throws ResourceLoadingException if an error occured.
*/
public synchronized ResourceBundleData loadResourceBundle(final ResourceKey key) throws ResourceLoadingException
{
final ResourceBundleDataCache bundleCache = getBundleCache();
final ResourceBundleDataCacheEntry cached = bundleCache.get(key);
if (cached != null)
{
final ResourceBundleData data = cached.getData();
// check, whether it is valid.
final long version = data.getVersion(this);
if ((cached.getStoredVersion() < 0) ||
(version >= 0 && cached.getStoredVersion() == version))
{
// now also make sure that the underlying data has not changed.
// This may look a bit superfluous, but the repository may not provide
// sensible cacheable information.
final ResourceDataCacheEntry bundleRawDataCacheEntry = getDataCache().get(data.getBundleKey());