jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1208836 - /jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
Date Wed, 30 Nov 2011 22:16:36 GMT
Author: pmouawad
Date: Wed Nov 30 22:16:35 2011
New Revision: 1208836

URL: http://svn.apache.org/viewvc?rev=1208836&view=rev
Log:
Made code cleaner

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java?rev=1208836&r1=1208835&r2=1208836&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java Wed Nov 30 22:16:35
2011
@@ -389,10 +389,10 @@ public class ResultCollector extends Abs
             // Find the name of the directory containing the file
             // and create it - if there is one
             File pdir = new File(filename).getParentFile();
-            if (pdir != null) {
-                pdir.mkdirs();// returns false if directory already exists, so need to check
again
-                if (!pdir.exists()){
-                    log.warn("Error creating directories for "+pdir.toString());
+            if (pdir != null && !pdir.exists()) {
+                boolean mkdirResult = pdir.mkdirs();
+                if (!mkdirResult){
+                    log.warn("Error creating directories for "+pdir.getAbsolutePath());
                 }
             }
             writer = new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(new
FileOutputStream(filename,



Mime
View raw message