From 0ffef12a8ba14284dc0f637cd0252074faf5392e Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Sat, 31 May 2014 06:42:27 -0400 Subject: [PATCH] deprecated the proxyUrl field replacing it with proxyServer; getter and setter for proxyUrl now just wrap proxyServer Former-commit-id: 5f1fbdf2eda6f05252f81dd8bf7acd44c01b7b6f --- .../agent/DependencyCheckScanAgent.java | 47 ++++++++++++++----- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/dependency-check-core/src/main/java/org/owasp/dependencycheck/agent/DependencyCheckScanAgent.java b/dependency-check-core/src/main/java/org/owasp/dependencycheck/agent/DependencyCheckScanAgent.java index c49779843..5f3894aeb 100644 --- a/dependency-check-core/src/main/java/org/owasp/dependencycheck/agent/DependencyCheckScanAgent.java +++ b/dependency-check-core/src/main/java/org/owasp/dependencycheck/agent/DependencyCheckScanAgent.java @@ -234,26 +234,49 @@ public class DependencyCheckScanAgent { } /** - * The Proxy URL. + * The Proxy Server. */ - private String proxyUrl; + private String proxyServer; /** - * Get the value of proxyUrl. + * Get the value of proxyServer. * - * @return the value of proxyUrl + * @return the value of proxyServer */ - public String getProxyUrl() { - return proxyUrl; + public String getProxyServer() { + return proxyServer; } /** - * Set the value of proxyUrl. + * Set the value of proxyServer. * - * @param proxyUrl new value of proxyUrl + * @param proxyServer new value of proxyServer */ + public void setProxyServer(String proxyServer) { + this.proxyServer = proxyServer; + } + + /** + * Get the value of proxyServer. + * + * @return the value of proxyServer + * @deprecated use {@link org.owasp.dependencycheck.agent.DependencyCheckScanAgent#getProxyServer()} instead + */ + @Deprecated + public String getProxyUrl() { + return proxyServer; + } + + /** + * Set the value of proxyServer. + * + * @param proxyUrl new value of proxyServer + * @deprecated use {@link org.owasp.dependencycheck.agent.DependencyCheckScanAgent#setProxyServer(java.lang.String) + * } instead + */ + @Deprecated public void setProxyUrl(String proxyUrl) { - this.proxyUrl = proxyUrl; + this.proxyServer = proxyUrl; } /** @@ -792,7 +815,7 @@ public class DependencyCheckScanAgent { /** * 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. + * properties required to change the proxy server, port, and connection timeout. */ private void populateSettings() { Settings.initialize(); @@ -808,8 +831,8 @@ public class DependencyCheckScanAgent { Settings.setBoolean(Settings.KEYS.AUTO_UPDATE, autoUpdate); - if (proxyUrl != null && !proxyUrl.isEmpty()) { - Settings.setString(Settings.KEYS.PROXY_SERVER, proxyUrl); + if (proxyServer != null && !proxyServer.isEmpty()) { + Settings.setString(Settings.KEYS.PROXY_SERVER, proxyServer); } if (proxyPort != null && !proxyPort.isEmpty()) { Settings.setString(Settings.KEYS.PROXY_PORT, proxyPort);