This is an automated email from the ASF dual-hosted git repository.

veithen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ws-axiom.git


The following commit(s) were added to refs/heads/master by this push:
     new 094b7cf74 Simplify comparator creation
094b7cf74 is described below

commit 094b7cf74cc0f0c859994bf8a22908c0328d0549
Author: Andreas Veithen <[email protected]>
AuthorDate: Fri Jun 3 20:49:24 2022 +0000

    Simplify comparator creation
---
 .../main/java/org/apache/axiom/ts/soap/fault/TestChildOrder.java  | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git 
a/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/fault/TestChildOrder.java
 
b/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/fault/TestChildOrder.java
index c2b58e5d0..70bd459b0 100644
--- 
a/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/fault/TestChildOrder.java
+++ 
b/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/fault/TestChildOrder.java
@@ -82,13 +82,7 @@ public class TestChildOrder extends SOAPTestCase {
         // Calculate the order in which we expect to see the children. Note 
that a given type
         // may be added multiple times. Therefore we need to use a Set.
         SortedSet<SOAPFaultChild> outputOrder =
-                new TreeSet<>(
-                        new Comparator<SOAPFaultChild>() {
-                            @Override
-                            public int compare(SOAPFaultChild o1, 
SOAPFaultChild o2) {
-                                return o1.getOrder() - o2.getOrder();
-                            }
-                        });
+                new 
TreeSet<>(Comparator.comparingInt(SOAPFaultChild::getOrder));
         outputOrder.addAll(Arrays.asList(inputOrder));
         // Check the result using the given serialization strategy
         Document document =

Reply via email to