jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1520922 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
Date Sun, 08 Sep 2013 20:40:12 GMT
Author: pmouawad
Date: Sun Sep  8 20:40:11 2013
New Revision: 1520922

URL: http://svn.apache.org/r1520922
Log:
Test for existence before trying to delete (thanks sebb)

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java?rev=1520922&r1=1520921&r2=1520922&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java Sun Sep
 8 20:40:11 2013
@@ -430,7 +430,7 @@ public class Proxy extends Thread {
             } else {
                 log.info(port + "Generating standard keypair in " + canonicalPath);
                 // Must not exist
-                if(!certFile.delete()) {
+                if(certFile.exists() && !certFile.delete()) {
                     throw new IOException("Could not delete file:"+certFile.getAbsolutePath()+",
this is needed for certificate generation");
                 }
                 KeyToolUtils.genkeypair(certFile, JMETER_SERVER_ALIAS, keyStorePass, CERT_VALIDITY,
null, null);                    



Mime
View raw message