/**
  * Create a registry context with custom configuration and realm service.
  *
  * @param configStream configuration stream. (registry.xml input stream)
  * @param urlSupplier url supplier object.
  * @throws RegistryException throws if the construction failed.
  */
 @SuppressWarnings("deprecation")
 protected RegistryContext(InputStream configStream, RegURLSupplier urlSupplier)
     throws RegistryException {
   // setBaseInstance will do the necessary security check.
   setBaseInstance(this);
   this.urlSupplier = urlSupplier;
   RegistryConfigurationProcessor.populateRegistryConfig(configStream, this);
 }
 /**
  * Create a registry context with custom configuration and realm service.
  *
  * @param configStream configuration stream. (registry.xml input stream)
  * @param realmService the associated realm service
  * @param populateConfiguration whether the configuration must be populated or not.
  * @throws RegistryException throws if the construction failed.
  */
 protected RegistryContext(
     InputStream configStream, RealmService realmService, boolean populateConfiguration)
     throws RegistryException {
   // setBaseInstance will do the necessary security check.
   setBaseInstance(this);
   this.realmService = realmService;
   if (populateConfiguration) {
     RegistryConfigurationProcessor.populateRegistryConfig(configStream, this);
   }
 }