diff --git a/releng/org.eclipse.rse.build/bootstrap.sh b/releng/org.eclipse.rse.build/bootstrap.sh index 5f0cafac0b2..326923b97fd 100644 --- a/releng/org.eclipse.rse.build/bootstrap.sh +++ b/releng/org.eclipse.rse.build/bootstrap.sh @@ -1,6 +1,6 @@ #!/bin/sh #******************************************************************************* -# Copyright (c) 2005, 2006 IBM Corporation and others. +# Copyright (c) 2005, 2006 IBM Corporation and Wind River Systems, Inc. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at @@ -8,7 +8,7 @@ # # Contributors: # IBM Corporation - initial API and implementation -# Martin Oberhuber (WindRiver) - Adapt for TM / RSE +# Martin Oberhuber (Wind River) - Adapt for TM / RSE #******************************************************************************* # User specific environment and startup programs umask 002 diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfigurationAdapterFactory.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfigurationAdapterFactory.java index eb7accb4b76..3ad6da7b010 100644 --- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfigurationAdapterFactory.java +++ b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/DeveloperSubSystemConfigurationAdapterFactory.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -21,8 +21,7 @@ import org.eclipse.core.runtime.IAdapterManager; import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; /** - * @author martin.oberhuber@windriver.com - * + * @see IAdapterFactory */ public class DeveloperSubSystemConfigurationAdapterFactory implements IAdapterFactory { diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/IDeveloperSubSystem.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/IDeveloperSubSystem.java index e073498e3bb..226d2b8672f 100644 --- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/IDeveloperSubSystem.java +++ b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/subsystems/IDeveloperSubSystem.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/propertypages/FolderInfoPropertyPage.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/propertypages/FolderInfoPropertyPage.java index 463f29b9916..a9316e3ff21 100644 --- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/propertypages/FolderInfoPropertyPage.java +++ b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/propertypages/FolderInfoPropertyPage.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySet.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySet.java index ffba4949615..eb725dfc150 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySet.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IPropertySet.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java index 392dd14b385..6b2cfe3ecb9 100644 --- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java +++ b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/PathUtility.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2006 IBM Corporation and Wind River Systems, Inc. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,8 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (WindRiver) - Fix for bug 161844 - regex matching backslashes + * ********************************************************************************/ package org.eclipse.rse.services.clientserver; @@ -29,9 +30,10 @@ public class PathUtility boolean containsDoubleSlashes = false; boolean endsWithSlash = false; - if (path.indexOf("/") != -1) containsForwardSlash = true; - if (path.indexOf("\\\\") != -1) containsDoubleSlashes = true; - if (path.endsWith("\\") || path.endsWith("/")) endsWithSlash = true; + //TODO Improve performance by using a pre-compiled Regex Pattern + if (path.indexOf('/') != -1) containsForwardSlash = true; + if (path.indexOf("\\\\") != -1) containsDoubleSlashes = true; //$NON-NLS-1$ + if (path.endsWith("\\") || path.endsWith("/")) endsWithSlash = true; //$NON-NLS-1$ //$NON-NLS-2$ boolean needsNormalizing = containsForwardSlash || containsDoubleSlashes || endsWithSlash; if (!needsNormalizing) return path; @@ -39,14 +41,15 @@ public class PathUtility if (containsForwardSlash) { path = path.replace('/', '\\'); - containsDoubleSlashes = (path.indexOf("\\\\") != -1); + containsDoubleSlashes = (path.indexOf("\\\\") != -1); //$NON-NLS-1$ } while (containsDoubleSlashes) { + //TODO Improve performance by manually iterating over char array //need to quote once for the string, then again for the regex - path = path.replaceAll("\\\\\\\\", "\\"); - containsDoubleSlashes = (path.indexOf("\\\\") != -1); + path = path.replaceAll("\\\\\\\\", "\\"); //$NON-NLS-1$ //$NON-NLS-2$ + containsDoubleSlashes = (path.indexOf("\\\\") != -1); //$NON-NLS-1$ } if (endsWithSlash) { @@ -62,9 +65,10 @@ public class PathUtility boolean containsDoubleSlashes = false; boolean endsWithSlash = false; - if (path.indexOf("\\") != -1) containsBackSlash = true; - if (path.indexOf("//") != -1) containsDoubleSlashes = true; - if (path.endsWith("\\") || path.endsWith("/")) endsWithSlash = true; + //TODO Improve performance by using a pre-compiled Regex Pattern + if (path.indexOf('\\') != -1) containsBackSlash = true; + if (path.indexOf("//") != -1) containsDoubleSlashes = true; //$NON-NLS-1$ + if (path.endsWith("\\") || path.endsWith("/")) endsWithSlash = true; //$NON-NLS-1$ //$NON-NLS-2$ boolean needsNormalizing = containsBackSlash || containsDoubleSlashes || endsWithSlash; if (!needsNormalizing) return path; @@ -72,13 +76,14 @@ public class PathUtility if (containsBackSlash) { path = path.replace('\\', '/'); - containsDoubleSlashes = (path.indexOf("//") != -1); + containsDoubleSlashes = (path.indexOf("//") != -1); //$NON-NLS-1$ } while (containsDoubleSlashes) { - path = path.replaceAll("//", "/"); - containsDoubleSlashes = (path.indexOf("//") != -1); + //TODO Improve performance by manually iterating over char array + path = path.replaceAll("//", "/"); //$NON-NLS-1$ //$NON-NLS-2$ + containsDoubleSlashes = (path.indexOf("//") != -1); //$NON-NLS-1$ } if (endsWithSlash) @@ -129,11 +134,11 @@ public class PathUtility { if (path.length() > 1 && path.charAt(1) == ':') { - return "\\"; + return "\\"; //$NON-NLS-1$ } else { - return "/"; + return "/"; //$NON-NLS-1$ } } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml index ae65880a273..047480ec1eb 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml +++ b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml @@ -1,6 +1,6 @@