This is an automated email from the ASF dual-hosted git repository.
fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git
The following commit(s) were added to refs/heads/master by this push:
new 51507ea Logger and string usage warning fix
51507ea is described below
commit 51507ea138dddcdb997b5d2c6626a894901ee468
Author: Sampath Kumar Krishnasamy <[email protected]>
AuthorDate: Tue Jan 4 14:51:41 2022 +0000
Logger and string usage warning fix
Closes #689
---
.../src/main/java/org/apache/jmeter/functions/StringFromFile.java | 5 ++---
xdocs/changes.xml | 2 ++
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git
a/src/functions/src/main/java/org/apache/jmeter/functions/StringFromFile.java
b/src/functions/src/main/java/org/apache/jmeter/functions/StringFromFile.java
index e1b221d..fc2207f 100644
---
a/src/functions/src/main/java/org/apache/jmeter/functions/StringFromFile.java
+++
b/src/functions/src/main/java/org/apache/jmeter/functions/StringFromFile.java
@@ -122,7 +122,7 @@ public class StringFromFile extends AbstractFunction
implements TestStateListene
public StringFromFile() {
if (log.isDebugEnabled()) {
- log.debug("++++++++ Construct {}" + this);
+ log.debug("++++++++ Construct {}", this);
}
}
@@ -147,9 +147,8 @@ public class StringFromFile extends AbstractFunction
implements TestStateListene
String tn = Thread.currentThread().getName();
fileName = ((CompoundVariable) values[0]).execute();
- String start = "";
if (values.length >= PARAM_START) {
- start = ((CompoundVariable) values[PARAM_START - 1]).execute();
+ String start = ((CompoundVariable) values[PARAM_START -
1]).execute();
try {
// Low chances to be non numeric, we parse
myStart = Integer.parseInt(start);
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 33606f2..15ce951 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -194,6 +194,7 @@ however, the profile can't be updated while the test is
running.
<li><pr>654</pr>Try do give better feedback while loading keystores</li>
<li><pr>672</pr>Add more details to documentation for timeShift function.
Contributed by Mariusz (mawasak at gmail.com)</li>
<li>Updated Gradle to 7.3 (from 7.2)</li>
+ <li><pr>689</pr>Code clean up in StringFromFile. Contributed by Sampath
Kumar Krishnasamy (sampathkumar.krishnasamykuppusamy at aexp.com)</li>
</ul>
<!-- =================== Bug fixes =================== -->
@@ -291,6 +292,7 @@ however, the profile can't be updated while the test is
running.
<li>Chromico Rek (atech5122 at gmail.com)</li>
<li>Magnus SpÄngdal (magnus.spangdal as avanza.se)</li>
<li>Piotr Smietana (piotrsmietana1998 at gmail.com)</li>
+ <li>Sampath Kumar Krishnasamy (sampathkumar.krishnasamykuppusamy at
aexp.com)</li>
</ul>
<p>We also thank bug reporters who helped us improve JMeter.</p>
<ul>