Takes the properties supplied and updates the dependency-check settings.
Additionally, this sets the system properties required to change the
proxy URL, port, and connection timeout.
979113
protected void populateSettings() {
        settings = new Settings();
        InputStream mojoProperties = null;
        try {
            mojoProperties = this.getClass().getClassLoader().getResourceAsStream(PROPERTIES_FILE);
            settings.mergeProperties(mojoProperties);
        } catch (IOException ex) {
            getLog().warn("Unable to load the dependency-check maven mojo.properties file.");
            if (getLog().isDebugEnabled()) {
                getLog().debug("", ex);
            }
        } finally {
            if (mojoProperties != null) {
                try {
                    mojoProperties.close();
                } catch (IOException ex) {
                    if (getLog().isDebugEnabled()) {
                        getLog().debug("", ex);
                    }
                }
            }
        }
        settings.setBooleanIfNotNull(Settings.KEYS.AUTO_UPDATE, autoUpdate);

        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_EXPERIMENTAL_ENABLED, enableExperimental);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_RETIRED_ENABLED, enableRetired);

        final Proxy proxy = getMavenProxy();
        if (proxy != null) {
            settings.setString(Settings.KEYS.PROXY_SERVER, proxy.getHost());
            settings.setString(Settings.KEYS.PROXY_PORT, Integer.toString(proxy.getPort()));
            final String userName = proxy.getUsername();
            final String password = proxy.getPassword();
            settings.setStringIfNotNull(Settings.KEYS.PROXY_USERNAME, userName);
            settings.setStringIfNotNull(Settings.KEYS.PROXY_PASSWORD, password);
            settings.setStringIfNotNull(Settings.KEYS.PROXY_NON_PROXY_HOSTS, proxy.getNonProxyHosts());
        }
        final String[] suppressions = determineSuppressions();
        settings.setArrayIfNotEmpty(Settings.KEYS.SUPPRESSION_FILE, suppressions);

        settings.setBooleanIfNotNull(Settings.KEYS.UPDATE_VERSION_CHECK_ENABLED, versionCheckEnabled);
        settings.setStringIfNotEmpty(Settings.KEYS.CONNECTION_TIMEOUT, connectionTimeout);
        settings.setStringIfNotEmpty(Settings.KEYS.HINTS_FILE, hintsFile);

        //File Type Analyzer Settings
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_JAR_ENABLED, jarAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NUSPEC_ENABLED, nuspecAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NUGETCONF_ENABLED, nugetconfAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_CENTRAL_ENABLED, centralAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_ARTIFACTORY_ENABLED, artifactoryAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NEXUS_ENABLED, nexusAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_ASSEMBLY_ENABLED, assemblyAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_ARCHIVE_ENABLED, archiveAnalyzerEnabled);
        settings.setStringIfNotEmpty(Settings.KEYS.ADDITIONAL_ZIP_EXTENSIONS, zipExtensions);
        settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_ASSEMBLY_DOTNET_PATH, pathToCore);

        settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_NEXUS_URL, nexusUrl);
        if (nexusServerId != null) {
            final Server server = settingsXml.getServer(nexusServerId);
            if (server != null) {
                final String nexusUser = server.getUsername();
                String nexusPassword = null;
                try {
                    nexusPassword = decryptServerPassword(server);
                } catch (SecDispatcherException ex) {
                    if (ex.getCause() instanceof FileNotFoundException
                            || (ex.getCause() != null && ex.getCause().getCause() instanceof FileNotFoundException)) {
                        //maybe its not encrypted?
                        final String tmp = server.getPassword();
                        if (tmp.startsWith("{") && tmp.endsWith("}")) {
                            getLog().error(String.format(
                                    "Unable to decrypt the server password for server id '%s' in settings.xml%n\tCause: %s",
                                    serverId, ex.getMessage()));
                        } else {
                            nexusPassword = tmp;
                        }
                    } else {
                        getLog().error(String.format(
                                "Unable to decrypt the server password for server id '%s' in settings.xml%n\tCause: %s",
                                serverId, ex.getMessage()));
                    }
                }
                settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_NEXUS_USER, nexusUser);
                settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_NEXUS_PASSWORD, nexusPassword);
            } else {
                getLog().error(String.format("Server '%s' not found in the settings.xml file", serverId));
            }
        }
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NEXUS_USES_PROXY, nexusUsesProxy);

        settings.setStringIfNotNull(Settings.KEYS.ANALYZER_ARTIFACTORY_URL, artifactoryAnalyzerUrl);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_ARTIFACTORY_USES_PROXY, artifactoryAnalyzerUseProxy);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_ARTIFACTORY_PARALLEL_ANALYSIS, artifactoryAnalyzerParallelAnalysis);

        if (Boolean.TRUE.equals(artifactoryAnalyzerEnabled)) {
            if (artifactoryAnalyzerServerId != null) {
                final Server server = settingsXml.getServer(artifactoryAnalyzerServerId);
                if (server != null) {
                    settings.setStringIfNotNull(Settings.KEYS.ANALYZER_ARTIFACTORY_API_USERNAME, server.getUsername());
                    settings.setStringIfNotNull(Settings.KEYS.ANALYZER_ARTIFACTORY_API_TOKEN, server.getPassword());
                }
            } else {
                settings.setStringIfNotNull(Settings.KEYS.ANALYZER_ARTIFACTORY_API_USERNAME, artifactoryAnalyzerUsername);
                settings.setStringIfNotNull(Settings.KEYS.ANALYZER_ARTIFACTORY_API_TOKEN, artifactoryAnalyzerApiToken);
            }
            settings.setStringIfNotNull(Settings.KEYS.ANALYZER_ARTIFACTORY_BEARER_TOKEN, artifactoryAnalyzerBearerToken);
        }

        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_PYTHON_DISTRIBUTION_ENABLED, pyDistributionAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_PYTHON_PACKAGE_ENABLED, pyPackageAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_RUBY_GEMSPEC_ENABLED, rubygemsAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_OPENSSL_ENABLED, opensslAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_CMAKE_ENABLED, cmakeAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_AUTOCONF_ENABLED, autoconfAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_COMPOSER_LOCK_ENABLED, composerAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NODE_PACKAGE_ENABLED, nodeAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NODE_AUDIT_ENABLED, nodeAuditAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_RETIREJS_ENABLED, retireJsAnalyzerEnabled);
        getSettings().setStringIfNotNull(Settings.KEYS.ANALYZER_RETIREJS_REPO_JS_URL, retireJsUrl);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_BUNDLE_AUDIT_ENABLED, bundleAuditAnalyzerEnabled);
        settings.setStringIfNotNull(Settings.KEYS.ANALYZER_BUNDLE_AUDIT_PATH, bundleAuditPath);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_COCOAPODS_ENABLED, cocoapodsAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_SWIFT_PACKAGE_MANAGER_ENABLED, swiftPackageManagerAnalyzerEnabled);
        settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_OSSINDEX_ENABLED, ossindexAnalyzerEnabled);
        settings.setStringIfNotEmpty(Settings.KEYS.ANALYZER_OSSINDEX_URL, ossindexAnalyzerUrl);

        if (retirejs != null) {
            settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_RETIREJS_FILTER_NON_VULNERABLE, retirejs.getFilterNonVulnerable());
            settings.setArrayIfNotEmpty(Settings.KEYS.ANALYZER_RETIREJS_FILTERS, retirejs.getFilters());
        }

        //Database configuration
        settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_NAME, databaseDriverName);
        settings.setStringIfNotEmpty(Settings.KEYS.DB_DRIVER_PATH, databaseDriverPath);
        settings.setStringIfNotEmpty(Settings.KEYS.DB_CONNECTION_STRING, connectionString);

        if (databaseUser == null && databasePassword == null && serverId != null) {
            final Server server = settingsXml.getServer(serverId);
            if (server != null) {
                databaseUser = server.getUsername();
                try {
                    databasePassword = decryptServerPassword(server);
                } catch (SecDispatcherException ex) {
                    if (ex.getCause() instanceof FileNotFoundException
                            || (ex.getCause() != null && ex.getCause().getCause() instanceof FileNotFoundException)) {
                        //maybe its not encrypted?
                        final String tmp = server.getPassword();
                        if (tmp.startsWith("{") && tmp.endsWith("}")) {
                            getLog().error(String.format(
                                    "Unable to decrypt the server password for server id '%s' in settings.xml%n\tCause: %s",
                                    serverId, ex.getMessage()));
                        } else {
                            databasePassword = tmp;
                        }
                    } else {
                        getLog().error(String.format(
                                "Unable to decrypt the server password for server id '%s' in settings.xml%n\tCause: %s",
                                serverId, ex.getMessage()));
                    }
                }
            } else {
                getLog().error(String.format("Server '%s' not found in the settings.xml file", serverId));
            }
        }

        settings.setStringIfNotEmpty(Settings.KEYS.DB_USER, databaseUser);
        settings.setStringIfNotEmpty(Settings.KEYS.DB_PASSWORD, databasePassword);
        settings.setStringIfNotEmpty(Settings.KEYS.DATA_DIRECTORY, dataDirectory);

        settings.setStringIfNotEmpty(Settings.KEYS.CVE_MODIFIED_JSON, cveUrlModified);
        settings.setStringIfNotEmpty(Settings.KEYS.CVE_BASE_JSON, cveUrlBase);
        settings.setIntIfNotNull(Settings.KEYS.CVE_CHECK_VALID_FOR_HOURS, cveValidForHours);

        artifactScopeExcluded = new ArtifactScopeExcluded(skipTestScope, skipProvidedScope, skipSystemScope, skipRuntimeScope);
        artifactTypeExcluded = new ArtifactTypeExcluded(skipArtifactType);
    }
1307578
def _update_proxy(self, change):
        
        if change['name'] in ['row', 'column']:
            super(AbstractWidgetItem, self)._update_proxy(change)
        else:
            self.proxy.data_changed(change)
850821
def set_proxy(self, proxy_server, proxy_port, proxy_username,
                  proxy_password):
        
        if proxy_server and proxy_port:
            if proxy_username and proxy_password:
                self.proxy = {
                    "http": "http://{}:{}@{}:{}".format(proxy_username,
                                                        proxy_password,
                                                        proxy_server,
                                                        proxy_port),
                    "https": "https://{}:{}@{}:{}".format(proxy_username,
                                                          proxy_password,
                                                          proxy_server,
                                                          proxy_port),
                }
            else:
                self.proxy = {
                    "http": "http://{}:{}".format(proxy_server, proxy_port),
                    "https": "https://{}:{}".format(proxy_server, proxy_port),
                }
619616
protected void updatePropertyFile() {
        final String methodName = "updatePropertyFile()";
        final File f = new File(htodPropertyFileName);
        final CacheOnDisk cod = this;
        traceDebug(methodName, "cacheName=" + this.cacheName);
        AccessController.doPrivileged(new PrivilegedAction() {
            public Object run() {
                FileOutputStream fos = null;
                Properties htodProp = new Properties();

                try {
                    fos = new FileOutputStream(f);
                    htodProp.put(HTOD_VERSION, HTOD_VERSION_NUM);
                    htodProp.put(DISABLE_DEPENDENCY_ID, Boolean.toString(disableDependencyId));
                    htodProp.put(DISABLE_TEMPLATE_SUPPORT, Boolean.toString(disableTemplatesSupport));
                    long cacheSizeInBytes = 0;
                    int fieldCheck = 0;
                    if (cod.enableCacheSizeInBytes) {
                        if (cod.currentCacheSizeInBytes < cod.htod.minDiskCacheSizeInBytes) {
                            cod.currentCacheSizeInBytes = cod.htod.minDiskCacheSizeInBytes;
                        }
                        cacheSizeInBytes = cod.currentCacheSizeInBytes;
                        htodProp.put(CACHE_SIZE_IN_BYTES, Long.toString(cacheSizeInBytes));
                        String s = String.valueOf(cacheSizeInBytes);
                        byte[] b = s.getBytes("UTF-8");
                        fieldCheck = 0;
                        for (int i = 0; i < b.length; i++) {
                            fieldCheck += (int) b[i];
                        }
                        fieldCheck = fieldCheck * 3;
                        htodProp.put(FIELD_CHECK, String.valueOf(fieldCheck));
                        htodProp.put(DATA_GB, String.valueOf(cod.diskCacheSizeInfo.currentDataGB));
                        htodProp.put(DEPID_GB, String.valueOf(cod.diskCacheSizeInfo.currentDependencyIdGB));
                        htodProp.put(TEMPLATE_GB, String.valueOf(cod.diskCacheSizeInfo.currentTemplateGB));
                        traceDebug(methodName, "cacheName=" + cod.cacheName + " disableDependencyId=" + disableDependencyId
                                               + " disableTemplatesSupport=" + disableTemplatesSupport + " cacheSizeInBytes=" + cacheSizeInBytes + " fieldCheck="
                                               + fieldCheck + " dataGB=" + cod.diskCacheSizeInfo.currentDataGB + " dependencyIdGB="
                                               + cod.diskCacheSizeInfo.currentDependencyIdGB + " templateGB=" + cod.diskCacheSizeInfo.currentTemplateGB);
                    } else {
                        traceDebug(methodName, "cacheName=" + cod.cacheName + " disableDependencyId=" + disableDependencyId
                                               + " disableTemplatesSupport=" + disableTemplatesSupport);
                    }
                    htodProp.store(fos, "HTOD properties - Do not modify the properties");
                } catch (Throwable t) {
                    com.ibm.ws.ffdc.FFDCFilter.processException(t, "com.ibm.ws.cache.CacheOnDisk.updatePropertyFile", "651", cod);
                    traceDebug(methodName, "cacheName=" + cod.cacheName + "\nException: " + ExceptionUtility.getStackTrace(t));
                } finally {
                    try {
                        if (fos != null) {
                            fos.close();
                        }
                    } catch (Throwable t) {
                        com.ibm.ws.ffdc.FFDCFilter.processException(t, "com.ibm.ws.cache.CacheOnDisk.updatePropertyFile", "859", cod);
                        traceDebug(methodName, "cacheName=" + cod.cacheName + "\nException: " + ExceptionUtility.getStackTrace(t));
                    }
                }
                return null;
            }
        });

    }
1318724
def _update_proxy(self, change):
        
        if change['name'] == 'items':
            self._update_visible_area()
        
        super(TableView, self)._update_proxy(change)
1372314
public void setProxy(Proxy proxy) {
        if (config.delivery instanceof HttpDelivery) {
            ((HttpDelivery) config.delivery).setProxy(proxy);
        }
        if (config.sessionDelivery instanceof HttpDelivery) {
            ((HttpDelivery) config.sessionDelivery).setProxy(proxy);
        }
    }
916212
protected function setRouteProperties()
    {
        $this->current_route = $this->route->get();

        $this->path = $this->url->path();
        $this->is_backend = $this->url->isBackend();
        $this->is_install = $this->url->isInstall();

        $this->host = $this->server->httpHost();
        $this->scheme = $this->server->httpScheme();
        $this->uri_path = $this->server->requestUri();
        $this->is_ajax = $this->server->isAjaxRequest();
        $this->uri = $this->scheme . $this->host . $this->uri_path;

        $this->base = $this->request->base();
        $this->query = (array) $this->request->get(null, array(), 'array');
    }
1171266
def __set_proxy(self, config):
        
        if "proxy" in config and config["proxy"]:
            proxy = config["proxy"]
            splitted = proxy.split(':')
            if len(splitted) != 2:
                raise ValueError(ONEVIEW_CLIENT_INVALID_PROXY)

            proxy_host = splitted[0]
            proxy_port = int(splitted[1])
            self.__connection.set_proxy(proxy_host, proxy_port)
255248
private void setProperties(Properties properties) {
        Props props = new Props(properties);
        if(props.containsKey(ClientConfig.ENABLE_JMX_PROPERTY)) {
            this.setEnableJmx(props.getBoolean(ClientConfig.ENABLE_JMX_PROPERTY));
        }

        if(props.containsKey(ClientConfig.BOOTSTRAP_URLS_PROPERTY)) {
            List<String> urls = props.getList(ClientConfig.BOOTSTRAP_URLS_PROPERTY);
            if(urls.size() > 0) {
                setHttpBootstrapURL(urls.get(0));
            }
        }

        if(props.containsKey(ClientConfig.MAX_TOTAL_CONNECTIONS_PROPERTY)) {
            setMaxR2ConnectionPoolSize(props.getInt(ClientConfig.MAX_TOTAL_CONNECTIONS_PROPERTY,
                                                    maxR2ConnectionPoolSize));
        }

        if(props.containsKey(ClientConfig.ROUTING_TIMEOUT_MS_PROPERTY))
            this.setTimeoutMs(props.getLong(ClientConfig.ROUTING_TIMEOUT_MS_PROPERTY, timeoutMs),
                              TimeUnit.MILLISECONDS);

        // By default, make all the timeouts equal to routing timeout
        timeoutConfig = new TimeoutConfig(timeoutMs, false);

        if(props.containsKey(ClientConfig.GETALL_ROUTING_TIMEOUT_MS_PROPERTY))
            timeoutConfig.setOperationTimeout(VoldemortOpCode.GET_ALL_OP_CODE,
                                              props.getInt(ClientConfig.GETALL_ROUTING_TIMEOUT_MS_PROPERTY));

        if(props.containsKey(ClientConfig.GET_ROUTING_TIMEOUT_MS_PROPERTY))
            timeoutConfig.setOperationTimeout(VoldemortOpCode.GET_OP_CODE,
                                              props.getInt(ClientConfig.GET_ROUTING_TIMEOUT_MS_PROPERTY));

        if(props.containsKey(ClientConfig.PUT_ROUTING_TIMEOUT_MS_PROPERTY)) {
            long putTimeoutMs = props.getInt(ClientConfig.PUT_ROUTING_TIMEOUT_MS_PROPERTY);
            timeoutConfig.setOperationTimeout(VoldemortOpCode.PUT_OP_CODE, putTimeoutMs);
            // By default, use the same thing for getVersions() also
            timeoutConfig.setOperationTimeout(VoldemortOpCode.GET_VERSION_OP_CODE, putTimeoutMs);
        }

        // of course, if someone overrides it, we will respect that
        if(props.containsKey(ClientConfig.GET_VERSIONS_ROUTING_TIMEOUT_MS_PROPERTY))
            timeoutConfig.setOperationTimeout(VoldemortOpCode.GET_VERSION_OP_CODE,
                                              props.getInt(ClientConfig.GET_VERSIONS_ROUTING_TIMEOUT_MS_PROPERTY));

        if(props.containsKey(ClientConfig.DELETE_ROUTING_TIMEOUT_MS_PROPERTY))
            timeoutConfig.setOperationTimeout(VoldemortOpCode.DELETE_OP_CODE,
                                              props.getInt(ClientConfig.DELETE_ROUTING_TIMEOUT_MS_PROPERTY));

        if(props.containsKey(ClientConfig.ALLOW_PARTIAL_GETALLS_PROPERTY))
            timeoutConfig.setPartialGetAllAllowed(props.getBoolean(ClientConfig.ALLOW_PARTIAL_GETALLS_PROPERTY));

    }
389314
public void updateProperties(InputStream inputStream) {
        try {
            conf.load(inputStream);
            conf.putAll(System.getProperties());
        } catch (IOException e) {
            log.warn("Error loading system properties from input stream", e);
        }
    }
928373
public void setupProxy() throws InvalidProxyException {
        // are we running through a proxy
        if (Property.isProxySet()) {
            // set the proxy information
            Proxy proxy = new Proxy();
            proxy.setHttpProxy(Property.getProxy());
            desiredCapabilities.setCapability(CapabilityType.PROXY, proxy);
        }
    }
399815
public static void setRequestProperties(final Properties props, HttpURLConnection conn, Integer timeout) {
        if (props != null) {
            if (props.get("User-Agent") == null) {
                conn.setRequestProperty("User-Agent", "Java");
            }

            for (Entry entry : props.entrySet()) {
                conn.setRequestProperty(String.valueOf(entry.getKey()), String.valueOf(entry.getValue()));
            }
        }

        if (timeout != null) {
            conn.setConnectTimeout(timeout * 1000);
        }

    }
854877
public void updateValue()
    {
        try
        {
            Method method = m_propertyMetadata.getSetMethod();
            //Object convertedValue = ValidationUtils.convertTo(getClazz(), m_currentValue);
            if (m_currentValue == null && method.getParameterTypes()[0].isPrimitive())
            {
                method.invoke(m_proxyObject.getObject(), ConvertUtils.getPrimitiveTypeForNull(method.getParameterTypes()[0]));
            }
            else
            {
                method.invoke(m_proxyObject.getObject(), m_currentValue);
            }
            m_useCurrentValue = false;
            m_notKnown = false;
        }
        catch (Exception e)
        {
            throw new RuntimeException(e);
        }
    }
1084605
def update(self, friendly_name=values.unset):
        
        return self._proxy.update(friendly_name=friendly_name, )
842576
private void setupRequestProperties(HttpURLConnection connection, Map<String, Object> properties) {
		Set<Entry<String, Object>> entries = properties.entrySet();
		for (Entry<String, Object> e : entries) {
			String name = e.getKey();
			Object value = e.getValue();

			if (name != null && value != null) {
				connection.setRequestProperty(name, value.toString());
			}
		}
	}
714066
public void configPropertiesUpdated(Dictionary<String, String> properties)
    {
        if (HttpServiceTracker.propertiesEqual(properties, configProperties))
            return;
        configProperties = properties;
        ServiceReference reference = context.getServiceReference(HttpService.class.getName());
        if (reference == null)
            return;
        HttpService httpService = (HttpService) context.getService(reference);

        String oldAlias = this.getAlias();
        this.changeServletProperties(servlet, properties);
        String alias = properties.get(BaseWebappServlet.ALIAS);
        boolean restartRequired = false;
        if (!oldAlias.equals(alias))
            restartRequired = true;
        else if (servlet instanceof WebappServlet)
            restartRequired = ((WebappServlet)servlet).restartRequired();
        if (!restartRequired)
            return;
        try {
            httpService.unregister(oldAlias);
        } catch (Exception e) {
            e.printStackTrace();    // Should not happen
        }
        this.properties.put(BaseWebappServlet.ALIAS, alias);
        
        if (servlet instanceof WebappServlet)
            if (((WebappServlet)servlet).restartRequired())
        {
            ((WebappServlet)servlet).free();
            servlet = null;
        }

        this.addingService(reference); // Start it back up
    }
1197554
private void setProxy(String proxyStr) {
    String[] strs = proxyStr.split(":", 2);
    if (strs.length != 2)
      throw new RuntimeException("Bad SOCKS proxy parameter: " + proxyStr);
    String host = strs[0];
    int port = Integer.parseInt(strs[1]);
    this.proxy =
        new Proxy(Proxy.Type.SOCKS, InetSocketAddress.createUnresolved(host,
            port));
  }