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 2019/10/03 12:23:37 UTC
[jmeter] branch master updated: Further simplify comparison
expression
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 0565293 Further simplify comparison expression
0565293 is described below
commit 05652933634972763c0a2af4031f64da979b78ca
Author: Felix Schumacher <fe...@internetallee.de>
AuthorDate: Thu Oct 3 14:22:25 2019 +0200
Further simplify comparison expression
Incorporate note from pascalschumacher.
Relates to #520 on github
---
.../java/org/apache/jmeter/visualizers/PropertyControlGui.java | 7 ++-----
xdocs/changes.xml | 1 +
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/components/src/main/java/org/apache/jmeter/visualizers/PropertyControlGui.java b/src/components/src/main/java/org/apache/jmeter/visualizers/PropertyControlGui.java
index 58d6a3d..6fa9dc3 100644
--- a/src/components/src/main/java/org/apache/jmeter/visualizers/PropertyControlGui.java
+++ b/src/components/src/main/java/org/apache/jmeter/visualizers/PropertyControlGui.java
@@ -26,6 +26,7 @@ import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
@@ -131,11 +132,7 @@ public class PropertyControlGui extends AbstractConfigGui implements
}
Set<Map.Entry<Object, Object>> s = p.entrySet();
List<Map.Entry<Object, Object>> al = new ArrayList<>(s);
- al.sort((o1, o2) -> {
- String m1 = (String) o1.getKey();
- String m2 = (String) o2.getKey();
- return m1.compareTo(m2);
- });
+ al.sort(Comparator.comparing(o -> (String) o.getKey()));
for (Map.Entry<Object, Object> row : al) {
tableModel.addRow(row);
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 5417ebd..9d1a333 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -267,6 +267,7 @@ to view the last release notes of version 5.1.1.
<li>Graham Russell (graham at ham1.co.uk)</li>
<li>Anass Benomar (anassbenomar at gmail.com)</li>
<li>Jakub Bednář (https://github.com/bednar)</li>
+ <li>Pascal Schumacher (pascalschumacher at apache.org)</li>
</ul>
<p>We also thank bug reporters who helped us improve JMeter.</p>
<ul>