Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed2002-08-30 20:40:10 +0000
committerGrant Gayed2002-08-30 20:40:10 +0000
commite2e7896b3cf0e9c97f6038a8e9fe8cfb357377bf (patch)
tree936b32d8f6cf693a8b0639307426703a3c765703 /bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FileDialog.java
parent6c3d09320a80d04a4af86bf267b2a2abdf43db21 (diff)
downloadeclipse.platform.swt-e2e7896b3cf0e9c97f6038a8e9fe8cfb357377bf.tar.gz
eclipse.platform.swt-e2e7896b3cf0e9c97f6038a8e9fe8cfb357377bf.tar.xz
eclipse.platform.swt-e2e7896b3cf0e9c97f6038a8e9fe8cfb357377bf.zip
*** empty log message ***
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FileDialog.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FileDialog.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FileDialog.java
index c34a1c587c..5691368c32 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FileDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FileDialog.java
@@ -187,8 +187,7 @@ void extractValues() {
*/
int index = fullPath.lastIndexOf ('/');
fileName = fullPath.substring (index + 1, fullPath.length ());
- fileNames = new String [1];
- fileNames [0] = fileName;
+ fileNames = new String [] {fileName};
}
} else {
int index = fullPath.lastIndexOf ('/');
@@ -204,8 +203,7 @@ void extractValues() {
*/
public String getFileName () {
if (cancel) return "";
- int index = fullPath.lastIndexOf ('/');
- return fullPath.substring (index + 1, fullPath.length ());
+ return fileName;
}
/**
@@ -217,9 +215,7 @@ public String getFileName () {
*/
public String [] getFileNames () {
if ((style & SWT.MULTI) != 0) return fileNames;
- String [] result = new String [1];
- result [0] = fileName;
- return result;
+ return new String [] {fileName};
}
/**

Back to the top