JSONPostProcessor does not set _ALL variable when only one match occurs

Bugzilla Id: 60730


git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1782882 13f79535-47bb-0310-9956-ffa450edef68

Former-commit-id: 740dd7420a
This commit is contained in:
Rainer Jung 2017-02-13 21:31:47 +00:00
parent c161cc002a
commit 9ef9fdcfac
2 changed files with 4 additions and 1 deletions

View File

@ -163,7 +163,7 @@ public class JSONPostProcessor extends AbstractScopedTestElement implements Seri
String suffix = (matchNumber < 0) ? "_1" : "";
placeObjectIntoVars(vars, currentRefName + suffix, extractedValues, 0);
if (matchNumber < 0 && getComputeConcatenation()) {
vars.put(currentRefName + ALL_SUFFIX, vars.get(currentRefName));
vars.put(currentRefName + ALL_SUFFIX, vars.get(currentRefName + suffix));
}
}
if (matchNumber != 0) {

View File

@ -103,6 +103,8 @@ JMeter now requires Java 8. Ensure you use most up to date version.
you use some advanced features. You can revert back to Rhino by settings property <code>javascript.use_rhino=true</code>.
You can read this <a href="https://wiki.openjdk.java.net/display/Nashorn/Rhino+Migration+Guide">migration guide</a> for more details on Nashorn. See <bugzilla>60672</bugzilla></li>
<li><bug>60729</bug>The Random Variable Config Element now allows minimum==maximum. Previous versions logged an error when minimum==maximum and did not set the configured variable.</li>
<li><bug>60730</bug>The JSON PostProcessor now sets the <code>_ALL</code> variable (assuming <code>Compute concatenation var</code> was checked)
even if the JSON path matches only once. Previous versions did not set the <code>_ALL</code> variable in this case.</li>
</ul>
<h3>Deprecated and removed elements or functions</h3>
@ -254,6 +256,7 @@ JMeter now requires Java 8. Ensure you use most up to date version.
Based on a patch by Qi Chen (qi.chensh at ele.me)</li>
<li><bug>60607</bug>DNS Cache Manager configuration is ignored</li>
<li><bug>60729</bug>The Random Variable Config Element should allow minimum==maximum</li>
<li><bug>60730</bug>The JSON PostProcessor should set the <code>_ALL</code> variable even if the JSON path matches only once.</li>
</ul>
<h3>Functions</h3>