jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Mouawad <philippe.moua...@gmail.com>
Subject Re: svn commit: r1520915 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
Date Sun, 08 Sep 2013 20:40:43 GMT
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 <sebbaz@gmail.com> wrote:

> On 8 September 2013 21:10,  <pmouawad@apache.org> 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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message