entity = entities.get(location); if (entity == null) { entity = loadEntity(location); entities.set(location, entity); lock.lock(); try { return loadEntity(location); } finally { lock.unlock();
entity = entities.get(location); if (entity == null) { entity = loadEntity(location); entities.set(location, entity); lock.lock(); try { return loadEntity(location); } finally { lock.unlock();