Bug 526221 - Replace StringUtil#replace with String.replace

Change-Id: If23802a4ae27a82ea3502b2869ea6b2e0668c6ef
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
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 7d78b38..d9ec6ea 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 @@
 		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 4460783..71867b0 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 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$
 	}