Hello sebb, Good catch. I added an existence test, same for other issue Regards Philippe
On Sun, Sep 8, 2013 at 10:38 PM, sebb <[email protected]> wrote: > On 8 September 2013 21:10, <[email protected]> wrote: > > 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"); > > + } > > Same issue here - won't delete return false if the file does not exist? > Again, I think failure can be left to the genkeypair() method to report. > > > KeyToolUtils.genkeypair(certFile, JMETER_SERVER_ALIAS, > keyStorePass, CERT_VALIDITY, null, null); > > } > > keyStore = getKeyStore(keyStorePass.toCharArray()); // This > should now work > > > > > -- Cordialement. Philippe Mouawad.
