Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2017-10-18 09:43:40 -0400
committerAlexander Kurtakov2017-10-18 11:10:48 -0400
commit56a7b0a5c00770a33b2991d79474189368ebd528 (patch)
tree47faddb46bfd699671fa4948870322a63048ff32
parente9efcb484933af8e5b6167b5d749a20e1c20c8ef (diff)
downloadeclipse.platform.team-I20171022-0800.tar.gz
eclipse.platform.team-I20171022-0800.tar.xz
eclipse.platform.team-I20171022-0800.zip
Change-Id: If23802a4ae27a82ea3502b2869ea6b2e0668c6ef Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/StringUtil.java30
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyBypass.java2
2 files changed, 1 insertions, 31 deletions
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/StringUtil.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/StringUtil.java
index 7d78b38d1..d9ec6eabc 100644
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/StringUtil.java
+++ b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/StringUtil.java
@@ -70,36 +70,6 @@ public class StringUtil {
return sequence1.equals(sequence2);
}
- /**
- * Replace within <code>source</code> the occurrences of <code>from</code>
- * with <code>to</code>.<br>
- * <b>Note:</b> This has the same behavior as the
- * <code>String.replace()</code> method within JDK 1.5.
- *
- * @param source
- * @param from
- * @param to
- * @return the substituted string
- */
- public static String replace(String source, String from, String to) {
- if (from.length() == 0)
- return source;
- StringBuilder buffer = new StringBuilder();
- int current = 0;
- int pos = 0;
- while (pos != -1) {
- pos = source.indexOf(from, current);
- if (pos == -1) {
- buffer.append(source.substring(current));
- } else {
- buffer.append(source.substring(current, pos));
- buffer.append(to);
- current = pos + from.length();
- }
- }
- return buffer.toString();
- }
-
public static boolean hostMatchesFilter(String host, String filter) {
String suffixMatchingFilter = "*" + filter; //$NON-NLS-1$
StringMatcher matcher = new StringMatcher(suffixMatchingFilter, true, false);
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyBypass.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyBypass.java
index 446078371..71867b0d6 100644
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyBypass.java
+++ b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyBypass.java
@@ -91,7 +91,7 @@ public class ProxyBypass {
}
public String[] getNonProxiedHosts() {
- String ret = StringUtil.replace(proxyBypass, "|", ";"); //$NON-NLS-1$ //$NON-NLS-2$
+ String ret = proxyBypass.replace("|", ";"); //$NON-NLS-1$ //$NON-NLS-2$
return StringUtil.split(ret, new String[] { ";" }); //$NON-NLS-1$
}

Back to the top