jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1539824 - /jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileDialoger.java
Date Thu, 07 Nov 2013 21:10:15 GMT
Author: pmouawad
Date: Thu Nov  7 21:10:15 2013
New Revision: 1539824

URL: http://svn.apache.org/r1539824
Log:
Bug 55753 - Improve FilePanel behaviour to start from the value set in Filename field if any
Fix issue on open file introduced by my change
Bugzilla Id: 55753

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileDialoger.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileDialoger.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileDialoger.java?rev=1539824&r1=1539823&r2=1539824&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileDialoger.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileDialoger.java Thu Nov  7 21:10:15
2013
@@ -81,9 +81,11 @@ public final class FileDialoger {
      */
     public static JFileChooser promptToOpenFile(String[] exts, String existingFileName) {
         // JFileChooser jfc = null;
-        File existingFileStart = new File(existingFileName);
-        if(!StringUtils.isEmpty(existingFileName) && existingFileStart.exists() &&
existingFileStart.canRead()) {
-            jfc.setCurrentDirectory(new File(existingFileName));
+        if(!StringUtils.isEmpty(existingFileName)) {
+            File existingFileStart = new File(existingFileName);
+            if(existingFileStart.exists() && existingFileStart.canRead()) {
+                jfc.setCurrentDirectory(new File(existingFileName));
+            }
         }
         else if (lastJFCDirectory == null) {
             String start = System.getProperty("user.dir", ""); //$NON-NLS-1$//$NON-NLS-2$



Mime
View raw message