diff options
author | Gary Gregory <garydgregory@gmail.com> | 2022-05-30 09:30:28 -0400 |
---|---|---|
committer | Gary Gregory <garydgregory@gmail.com> | 2022-05-30 09:30:28 -0400 |
commit | 16ed9eb220802405bef8c49ae937e9256a82b586 (patch) | |
tree | c5873c399c8a979259c8c6cd5ba71ecb04203de6 /src/test/java/org/apache | |
parent | 47f699be39a1ef1b28ea0c974c6143879251bdaf (diff) | |
download | apache-commons-lang-16ed9eb220802405bef8c49ae937e9256a82b586.tar.gz |
Reuse Function identity
Diffstat (limited to 'src/test/java/org/apache')
-rw-r--r-- | src/test/java/org/apache/commons/lang3/event/EventListenerSupportTest.java | 4 |
1 files 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: |