You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2018/02/11 21:08:01 UTC
svn commit: r1823898 - in /jmeter/trunk: ./
src/components/org/apache/jmeter/visualizers/
src/core/org/apache/jmeter/engine/util/ src/core/org/apache/jmeter/threads/
src/jorphan/org/apache/jorphan/math/
src/protocol/http/org/apache/jmeter/protocol/http...
Author: fschumacher
Date: Sun Feb 11 21:08:01 2018
New Revision: 1823898
URL: http://svn.apache.org/viewvc?rev=1823898&view=rev
Log:
Correct method param pad
plus some other whitespace policing.
Part of #358 on github. Based on contribution by Graham Russell (graham at ham1.co.uk)
Modified:
jmeter/trunk/checkstyle.xml
jmeter/trunk/src/components/org/apache/jmeter/visualizers/AxisGraph.java
jmeter/trunk/src/core/org/apache/jmeter/engine/util/FunctionParser.java
jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java
jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpClientDefaultParameters.java
Modified: jmeter/trunk/checkstyle.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/checkstyle.xml?rev=1823898&r1=1823897&r2=1823898&view=diff
==============================================================================
--- jmeter/trunk/checkstyle.xml (original)
+++ jmeter/trunk/checkstyle.xml Sun Feb 11 21:08:01 2018
@@ -163,6 +163,7 @@
<!--<module name="ClassFanOutComplexity"/>-->
<!--<module name="CyclomaticComplexity"/>-->
<!--<module name="NPathComplexity"/>-->
+ <module name="MethodParamPad"/>
<module name="TypecastParenPad"/>
<!--
Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/AxisGraph.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/AxisGraph.java?rev=1823898&r1=1823897&r2=1823898&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/AxisGraph.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/AxisGraph.java Sun Feb 11 21:08:01 2018
@@ -331,8 +331,8 @@ public class AxisGraph extends JPanel {
return max;
}
- private String squeeze (String input, int _maxLength){
- if (input.length()>_maxLength){
+ private String squeeze(String input, int _maxLength) {
+ if (input.length() > _maxLength) {
return input.substring(0,_maxLength-ELLIPSIS_LEN)+ELLIPSIS;
}
return input;
Modified: jmeter/trunk/src/core/org/apache/jmeter/engine/util/FunctionParser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/engine/util/FunctionParser.java?rev=1823898&r1=1823897&r2=1823898&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/engine/util/FunctionParser.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/engine/util/FunctionParser.java Sun Feb 11 21:08:01 2018
@@ -136,8 +136,8 @@ class FunctionParser {
reader.reset();// set to start of string
char []cb = new char[100];
int nbRead = reader.read(cb);
- throw new InvalidVariableException
- ("Expected } after "+funcName+" function call in "+new String(cb, 0, nbRead));
+ throw new InvalidVariableException("Expected } after "
+ + funcName + " function call in " + new String(cb, 0, nbRead));
}
if (function instanceof TestStateListener) {
StandardJMeterEngine.register((TestStateListener) function);
Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java?rev=1823898&r1=1823897&r2=1823898&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java Sun Feb 11 21:08:01 2018
@@ -46,7 +46,7 @@ public final class JMeterContextService
//@GuardedBy(JMeterContextService.class)
private static int totalThreads = 0;
-
+
private static UnmodifiableJMeterVariables variables;
@@ -165,7 +165,7 @@ public final class JMeterContextService
numberOfThreadsStarted = 0;
numberOfThreadsFinished = 0;
}
-
+
/**
* Get all variables accessible for JMeter client in a distributed test
* (only test plan and user defined variables)
@@ -177,14 +177,14 @@ public final class JMeterContextService
}
public static class ThreadCounts {
-
+
public final int activeThreads;
-
+
public final int startedThreads;
-
+
public final int finishedThreads;
-
- ThreadCounts (int active, int started, int finished) {
+
+ ThreadCounts(int active, int started, int finished) {
activeThreads = active;
startedThreads = started;
finishedThreads = finished;
Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java?rev=1823898&r1=1823897&r2=1823898&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java Sun Feb 11 21:08:01 2018
@@ -162,7 +162,7 @@ public abstract class StatCalculator<T e
}
// use Math.round () instead of simple (long) to provide correct value rounding
- long target = Math.round (count * percent);
+ long target = Math.round(count * percent);
try {
for (Entry<T, MutableLong> val : valuesMap.entrySet()) {
target -= val.getValue().longValue();
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java?rev=1823898&r1=1823897&r2=1823898&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java Sun Feb 11 21:08:01 2018
@@ -750,9 +750,9 @@ public class HTTPHC4Impl extends HTTPHCA
private int getHash(String s) {
return s == null ? 0 : s.hashCode();
}
-
+
@Override
- public boolean equals (Object obj){
+ public boolean equals(Object obj) {
if (this == obj) {
return true;
}
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpClientDefaultParameters.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpClientDefaultParameters.java?rev=1823898&r1=1823897&r2=1823898&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpClientDefaultParameters.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpClientDefaultParameters.java Sun Feb 11 21:08:01 2018
@@ -55,8 +55,8 @@ public class HttpClientDefaultParameters
*/
public static void load(String file,
final org.apache.http.params.HttpParams params){
- load(file,
- new GenericHttpParams (){
+ load(file,
+ new GenericHttpParams() {
@Override
public void setParameter(String name, Object value) {
params.setParameter(name, value);
@@ -71,7 +71,7 @@ public class HttpClientDefaultParameters
params.setParameter(name,
new org.apache.http.HttpVersion(
Integer.parseInt(parts[0]), Integer.parseInt(parts[1])));
- }
+ }
}
);
}