From 23805649ad04e5115d90b3fa33e3a59d2649b2ef Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Mon, 26 May 2003 07:40:18 +0000 Subject: [PATCH] INTEGRATION: CWS fwk03 (1.3.8); FILE MERGED 2003/05/16 07:41:58 dbo 1.3.8.1: #109701# internal StringHelper class --- .../star/lib/util/NativeLibraryLoader.java | 24 ++++--------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/jurt/com/sun/star/lib/util/NativeLibraryLoader.java b/jurt/com/sun/star/lib/util/NativeLibraryLoader.java index 3bfc8df297cf..92c703de89c5 100644 --- a/jurt/com/sun/star/lib/util/NativeLibraryLoader.java +++ b/jurt/com/sun/star/lib/util/NativeLibraryLoader.java @@ -2,9 +2,9 @@ * * $RCSfile: NativeLibraryLoader.java,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: vg $ $Date: 2003-05-22 08:56:11 $ + * last change: $Author: vg $ $Date: 2003-05-26 08:40:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -183,8 +183,8 @@ public final class NativeLibraryLoader { return url.getProtocol().equalsIgnoreCase("file") && url.getAuthority() == null && url.getQuery() == null && url.getRef() == null - ? new File(URLDecoder.decode(replace(url.getPath(), '+', - "%2B"))) + ? new File(URLDecoder.decode( + StringHelper.replace(url.getPath(), '+', "%2B"))) : null; } else { // If java.net.URI is avaliable, do @@ -223,20 +223,4 @@ public final class NativeLibraryLoader { } } } - - private static String replace(String str, char from, String to) { - StringBuffer b = new StringBuffer(); - for (int i = 0;;) { - int j = str.indexOf(from, i); - if (j == -1) { - b.append(str.substring(i)); - break; - } else { - b.append(str.substring(i, j)); - b.append(to); - i = j + 1; - } - } - return b.toString(); - } }