You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2016/02/13 15:03:31 UTC
svn commit: r1730209 - in /jmeter/trunk/src:
jorphan/org/apache/jorphan/exec/KeyToolUtils.java
monitor/model/org/apache/jmeter/monitor/parser/MonitorHandler.java
protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java
Author: pmouawad
Date: Sat Feb 13 14:03:31 2016
New Revision: 1730209
URL: http://svn.apache.org/viewvc?rev=1730209&view=rev
Log:
Respect naming conventions
Use java style array (vs C style)
Patch by Benoit Wiart Part 3
https://github.com/apache/jmeter/pull/115/files
Modified:
jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java
jmeter/trunk/src/monitor/model/org/apache/jmeter/monitor/parser/MonitorHandler.java
jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java
Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java?rev=1730209&r1=1730208&r2=1730209&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java Sat Feb 13 14:03:31 2016
@@ -208,20 +208,20 @@ public class KeyToolUtils {
*
* @throws IOException if keytool was not configured, running keytool application failed or copying the keys failed
*/
- public static void generateProxyCA(File keystore, String password, int validity) throws IOException {
- File caCert_crt = new File(ROOT_CACERT_CRT);
- File caCert_usr = new File(ROOT_CACERT_USR);
+ public static void generateProxyCA(File keystore, String password, int validity) throws IOException {
+ File caCertCrt = new File(ROOT_CACERT_CRT);
+ File caCertUsr = new File(ROOT_CACERT_USR);
boolean fileExists = false;
if (!keystore.delete() && keystore.exists()) {
log.warn("Problem deleting the keystore '" + keystore + "'");
fileExists = true;
}
- if (!caCert_crt.delete() && caCert_crt.exists()) {
- log.warn("Problem deleting the certificate file '" + caCert_crt + "'");
+ if (!caCertCrt.delete() && caCertCrt.exists()) {
+ log.warn("Problem deleting the certificate file '" + caCertCrt + "'");
fileExists = true;
}
- if (!caCert_usr.delete() && caCert_usr.exists()) {
- log.warn("Problem deleting the certificate file '" + caCert_usr + "'");
+ if (!caCertUsr.delete() && caCertUsr.exists()) {
+ log.warn("Problem deleting the certificate file '" + caCertUsr + "'");
fileExists = true;
}
if (fileExists) {
@@ -248,10 +248,10 @@ public class KeyToolUtils {
// Export the Root CA for Firefox/Chrome/IE
KeyToolUtils.keytool("-exportcert", keystore, password, ROOTCA_ALIAS, null, null, "-rfc", "-file", ROOT_CACERT_CRT);
// Copy for Opera
- if(caCert_crt.exists() && caCert_crt.canRead()) {
- FileUtils.copyFile(caCert_crt, caCert_usr);
+ if(caCertCrt.exists() && caCertCrt.canRead()) {
+ FileUtils.copyFile(caCertCrt, caCertUsr);
} else {
- log.warn("Failed creating "+caCert_crt.getAbsolutePath()+", check 'keytool' utility in path is available and points to a JDK >= 7");
+ log.warn("Failed creating "+caCertCrt.getAbsolutePath()+", check 'keytool' utility in path is available and points to a JDK >= 7");
}
}
Modified: jmeter/trunk/src/monitor/model/org/apache/jmeter/monitor/parser/MonitorHandler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/monitor/model/org/apache/jmeter/monitor/parser/MonitorHandler.java?rev=1730209&r1=1730208&r2=1730209&view=diff
==============================================================================
--- jmeter/trunk/src/monitor/model/org/apache/jmeter/monitor/parser/MonitorHandler.java (original)
+++ jmeter/trunk/src/monitor/model/org/apache/jmeter/monitor/parser/MonitorHandler.java Sat Feb 13 14:03:31 2016
@@ -316,7 +316,7 @@ public class MonitorHandler extends Defa
* @see org.xml.sax.ContentHandler#characters
*/
@Override
- public void characters(char ch[], int start, int length) throws SAXException {
+ public void characters(char[] ch, int start, int length) throws SAXException {
}
/**
Modified: jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java?rev=1730209&r1=1730208&r2=1730209&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java (original)
+++ jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java Sat Feb 13 14:03:31 2016
@@ -208,7 +208,7 @@ public class FTPSampler extends Abstract
if (isUpload()) {
String contents=getLocalFileContents();
if (contents.length() > 0){
- byte bytes[] = contents.getBytes(); // TODO - charset?
+ byte[] bytes = contents.getBytes(); // TODO - charset?
input = new ByteArrayInputStream(bytes);
res.setBytes(bytes.length);
} else {