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/12/31 15:56:24 UTC
svn commit: r1776790 -
/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/AbstractSamplerCreator.java
Author: pmouawad
Date: Sat Dec 31 15:56:23 2016
New Revision: 1776790
URL: http://svn.apache.org/viewvc?rev=1776790&view=rev
Log:
Sonar : fix squid:S00115 "Rename this constant name to match the regular expression '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'"
Fix also properties declaration order
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/AbstractSamplerCreator.java
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/AbstractSamplerCreator.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/AbstractSamplerCreator.java?rev=1776790&r1=1776789&r2=1776790&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/AbstractSamplerCreator.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/AbstractSamplerCreator.java Sat Dec 31 15:56:23 2016
@@ -40,37 +40,38 @@ public abstract class AbstractSamplerCre
protected static final String HTTPS = "https"; // $NON-NLS-1$
/** Filetype to be used for the temporary binary files*/
- private static final String binaryFileSuffix =
+ private static final String BINARY_FILE_SUFFIX =
JMeterUtils.getPropDefault("proxy.binary.filesuffix",// $NON-NLS-1$
".binary"); // $NON-NLS-1$
/** Which content-types will be treated as binary (exact match) */
- private static final Set<String> binaryContentTypes = new HashSet<>();
+ private static final Set<String> BINARY_CONTENT_TYPES = new HashSet<>();
/** Where to store the temporary binary files */
- private static final String binaryDirectory =
+ private static final String BINARY_DIRECTORY =
JMeterUtils.getPropDefault("proxy.binary.directory",// $NON-NLS-1$
System.getProperty("user.dir")); // $NON-NLS-1$ proxy.binary.filetype=binary
+ /*
+ * Optionally number the requests
+ */
+ private static final boolean NUMBER_REQUESTS =
+ JMeterUtils.getPropDefault("proxy.number.requests", true); // $NON-NLS-1$
+
+ private static AtomicInteger REQUEST_NUMBER = new AtomicInteger(0);// running number
+
+
static {
String binaries = JMeterUtils.getPropDefault("proxy.binary.types", // $NON-NLS-1$
"application/x-amf,application/x-java-serialized-object"); // $NON-NLS-1$
if (binaries.length() > 0){
StringTokenizer s = new StringTokenizer(binaries,"|, ");// $NON-NLS-1$
while (s.hasMoreTokens()){
- binaryContentTypes.add(s.nextToken());
+ BINARY_CONTENT_TYPES.add(s.nextToken());
}
}
}
-
- /*
- * Optionally number the requests
- */
- private static final boolean numberRequests =
- JMeterUtils.getPropDefault("proxy.number.requests", true); // $NON-NLS-1$
- private static AtomicInteger REQUEST_NUMBER = new AtomicInteger(0);// running number
-
/**
*
@@ -100,7 +101,7 @@ public abstract class AbstractSamplerCre
* @return boolean is numbering requests is required
*/
protected static boolean isNumberRequests() {
- return numberRequests;
+ return NUMBER_REQUESTS;
}
/**
@@ -111,21 +112,21 @@ public abstract class AbstractSamplerCre
if (contentType == null) {
return false;
}
- return binaryContentTypes.contains(contentType);
+ return BINARY_CONTENT_TYPES.contains(contentType);
}
/**
* @return String binary file suffix
*/
protected String getBinaryFileSuffix() {
- return binaryFileSuffix;
+ return BINARY_FILE_SUFFIX;
}
/**
* @return String binary directory
*/
protected String getBinaryDirectory() {
- return binaryDirectory;
+ return BINARY_DIRECTORY;
}
/**