docs: public DescriptorRepository getRepository()
      {
          DescriptorRepository repository;
          if (enablePerThreadChanges)
          {
              repository = (DescriptorRepository) threadedRepository.get();
              if (repository == null)
              {
                  repository = getGlobalRepository();
                  log.info(MSG_STR);
              }
  // arminw:
  // TODO: Be more strict in per thread mode and throw a exception when not find descriptor for calling thread?
  //            if (repository == null)
  //            {
  //                throw new MetadataException("Can't find a DescriptorRepository for current thread, don't forget" +
  //                        " to set a DescriptorRepository if enable per thread changes before perform other action");
  //            }
              return repository;
          }
          else
          {
              return globalRepository;
          }
      }