You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2011/11/12 12:05:29 UTC

svn commit: r1201245 - /jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java

Author: pmouawad
Date: Sat Nov 12 11:05:29 2011
New Revision: 1201245

URL: http://svn.apache.org/viewvc?rev=1201245&view=rev
Log:
Bug 52150 - FileServer has 3 confusingly similar methods to set the file base

Step 3, factor setBase when no null is sure

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java?rev=1201245&r1=1201244&r2=1201245&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java Sat Nov 12 11:05:29 2011
@@ -136,17 +136,15 @@ public class FileServer {
         if (scriptPath == null){
             throw new IllegalArgumentException("scriptPath must not be null");
         }
-        checkForOpenFiles();
-        // getParentFile() may not work on relative paths
         setScriptName(scriptPath.getName());
-        base = scriptPath.getAbsoluteFile().getParentFile();
-        log.info("Set new base '"+base+"'");
+        // getParentFile() may not work on relative paths
+        setBase(scriptPath.getAbsoluteFile().getParentFile());
     }
 
     /**
      * Sets the current base directory for relative file names.
      * 
-     * @param jmxBase the path of the script file base directory
+     * @param jmxBase the path of the script file base directory, cannot be null
      * @throws IllegalStateException if files are still open
      * @throws IllegalArgumentException if {@code basepath} is null
      */