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);
|