Return-Path: X-Original-To: apmail-jmeter-dev-archive@minotaur.apache.org Delivered-To: apmail-jmeter-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 76C071099A for ; Sun, 8 Sep 2013 20:38:33 +0000 (UTC) Received: (qmail 61670 invoked by uid 500); 8 Sep 2013 20:38:32 -0000 Delivered-To: apmail-jmeter-dev-archive@jmeter.apache.org Received: (qmail 61650 invoked by uid 500); 8 Sep 2013 20:38:32 -0000 Mailing-List: contact dev-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jmeter.apache.org Delivered-To: mailing list dev@jmeter.apache.org Received: (qmail 61642 invoked by uid 99); 8 Sep 2013 20:38:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Sep 2013 20:38:32 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sebbaz@gmail.com designates 209.85.212.170 as permitted sender) Received: from [209.85.212.170] (HELO mail-wi0-f170.google.com) (209.85.212.170) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Sep 2013 20:38:27 +0000 Received: by mail-wi0-f170.google.com with SMTP id cb5so2626753wib.5 for ; Sun, 08 Sep 2013 13:38:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=dvekpc6PlUSWnHCjHnmi8eYWs2Bzn3Q0NMaXO4MQKdY=; b=OeLHcfSS6gCFlW/Y9OqFIbuc5bgnPBZgQIoVqMBc2R2CQtO0m2e8f4pCZ3PgaX9yer 7EvNVOk/CT52dlJmLJg220MV5JE05WCwWYvDFmQf0aJkkvHVpCIy8htmfPiAZWJKkIig GZZO2zaTA2gBiDzYXI+E/PaA7TOQ8stA+A96g4/XgFd9tJEmZ4U7bW3VAPdtaLQsLvHk Cu3shoKZDbc74ysIuaQy5RUt/RUWLby7NiNTKYW2JDGw/W9/WUP+qWa01dPLV2TvX95q 0kFJ+5w5ClBx+szkYwXEPJVn6Sn5+/+F+tS/4x66tpMHVTaNwNuTDIhgfGyhTwNxmnad qF/A== MIME-Version: 1.0 X-Received: by 10.194.122.99 with SMTP id lr3mr9859839wjb.21.1378672686533; Sun, 08 Sep 2013 13:38:06 -0700 (PDT) Received: by 10.194.24.99 with HTTP; Sun, 8 Sep 2013 13:38:06 -0700 (PDT) In-Reply-To: <20130908201054.B2B9123888A6@eris.apache.org> References: <20130908201054.B2B9123888A6@eris.apache.org> Date: Sun, 8 Sep 2013 21:38:06 +0100 Message-ID: Subject: Re: svn commit: r1520915 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java From: sebb To: dev@jmeter.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On 8 September 2013 21:10, 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 > >