jmeter-commits mailing list archives

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

URL: http://svn.apache.org/r1520915
Log:
Test value of File#delete and throw if cannot delete it

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=1520915&r1=1520914&r2=1520915&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:10:54 2013
@@ -429,7 +429,10 @@ public class Proxy extends Thread {
                 log.info(port + "Created keystore in " + canonicalPath);
             } else {
                 log.info(port + "Generating standard keypair in " + canonicalPath);
-                certFile.delete(); // Must not exist
+                // Must not exist
+                if(!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);                    
             }
             keyStore = getKeyStore(keyStorePass.toCharArray()); // This should now work



Mime
View raw message