Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Thoms2018-02-24 08:44:32 -0500
committerAlexander Kurtakov2018-03-09 08:34:12 -0500
commit80aedf7d7251de0c03bbe902e4644855e7030be5 (patch)
treed3fd0de125986cbf9adfb7736c04992a29d01364
parent40637379e4dccde9a1736e8103ba143ae8a8be4d (diff)
downloadeclipse.platform.team-80aedf7d7251de0c03bbe902e4644855e7030be5.tar.gz
eclipse.platform.team-80aedf7d7251de0c03bbe902e4644855e7030be5.tar.xz
eclipse.platform.team-80aedf7d7251de0c03bbe902e4644855e7030be5.zip
Bug 531630 - Replace usage of System.getProperty("file.separator")
Change-Id: Ida18ec7c840c380570f3f4690683fedb55677cc1 Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java2
3 files changed, 3 insertions, 5 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
index 9a2d51362..2c1245128 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
@@ -91,8 +91,6 @@ public class InputPatchPage extends WizardPage {
protected final static String INPUTPATCHPAGE_NAME= "InputPatchPage"; //$NON-NLS-1$
- static final char SEPARATOR= System.getProperty("file.separator").charAt(0); //$NON-NLS-1$
-
private boolean fShowError= false;
private String fPatchSource;
private boolean fPatchRead= false;
@@ -621,7 +619,7 @@ public class InputPatchPage extends WizardPage {
dialog.setText(PatchMessages.InputPatchPage_SelectPatchFileDialog_title);
String patchFilePath= getPatchFilePath();
if (patchFilePath != null) {
- int lastSegment= patchFilePath.lastIndexOf(SEPARATOR);
+ int lastSegment= patchFilePath.lastIndexOf(File.separatorChar);
if (lastSegment > 0) {
patchFilePath= patchFilePath.substring(0, lastSegment);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java
index b1d151eae..1165f337f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java
@@ -113,7 +113,7 @@ public class ExportProjectSetLocationPage extends TeamWizardPage {
d.setFileName(TeamUIMessages.ExportProjectSetMainPage_default);
String fileName = getFileName();
if (fileName != null) {
- int separator = fileName.lastIndexOf(System.getProperty("file.separator").charAt(0)); //$NON-NLS-1$
+ int separator = fileName.lastIndexOf(File.separatorChar);
if (separator != -1) {
fileName = fileName.substring(0, separator);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java
index 25557fcdb..552a5521e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java
@@ -158,7 +158,7 @@ public class ImportProjectSetMainPage extends TeamWizardPage {
d.setFilterNames(new String[] {TeamUIMessages.ImportProjectSetMainPage_Project_Set_Files_2, TeamUIMessages.ImportProjectSetMainPage_allFiles}); //
String fileName= getFileName();
if (fileName != null && fileName.length() > 0) {
- int separator= fileName.lastIndexOf(System.getProperty ("file.separator").charAt (0)); //$NON-NLS-1$
+ int separator= fileName.lastIndexOf(File.separatorChar);
if (separator != -1) {
fileName= fileName.substring(0, separator);
}

Back to the top