You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/05/30 13:30:33 UTC

[commons-lang] branch master updated: Reuse Function identity

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

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
     new 16ed9eb22 Reuse Function identity
16ed9eb22 is described below

commit 16ed9eb220802405bef8c49ae937e9256a82b586
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon May 30 09:30:28 2022 -0400

    Reuse Function identity
---
 .../java/org/apache/commons/lang3/event/EventListenerSupportTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/event/EventListenerSupportTest.java b/src/test/java/org/apache/commons/lang3/event/EventListenerSupportTest.java
index 09080fed4..667703516 100644
--- a/src/test/java/org/apache/commons/lang3/event/EventListenerSupportTest.java
+++ b/src/test/java/org/apache/commons/lang3/event/EventListenerSupportTest.java
@@ -33,6 +33,7 @@ import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.function.Function;
 
 import org.easymock.EasyMock;
 import org.junit.jupiter.api.Test;
@@ -136,8 +137,7 @@ public class EventListenerSupportTest {
     @Test
     public void testSerialization() throws IOException, ClassNotFoundException, PropertyVetoException {
         final EventListenerSupport<VetoableChangeListener> listenerSupport = EventListenerSupport.create(VetoableChangeListener.class);
-        listenerSupport.addListener(e -> {
-        });
+        listenerSupport.addListener(Function.identity()::apply);
         listenerSupport.addListener(EasyMock.createNiceMock(VetoableChangeListener.class));
 
         //serialize: