File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
actor-tests/src/test/java/org/apache/pekko/dispatch
actor/src/main/scala/org/apache/pekko/dispatch Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 3838 uses : sbt/setup-sbt@v1
3939 - uses : scalacenter/sbt-dependency-submission@v3
4040 with :
41- configs-ignore : optional test compile-internal
41+ configs-ignore : provided optional test TestJdk9 compile-internal pr-validation
Original file line number Diff line number Diff line change @@ -189,6 +189,13 @@ public Boolean apply(String r) {
189189 assertEquals ("foo" , Await .result (r , timeout ));
190190 }
191191
192+ @ Test
193+ public void mustAllowCreatingLambdaFilter () {
194+ // compile-only test
195+ final CountDownLatch latch = new CountDownLatch (1 );
196+ Filter .filterOf (r -> { latch .countDown (); return r .equals ("foo" ); });
197+ }
198+
192199 // TODO: Improve this test, perhaps with an Actor
193200 @ Test
194201 public void mustSequenceAFutureList () throws Exception {
Original file line number Diff line number Diff line change @@ -370,6 +370,8 @@ abstract class Recover[+T] extends japi.RecoverBridge[T] {
370370object Filter {
371371 def filterOf [T ](f : pekko.japi.Function [T , java.lang.Boolean ]): (T => Boolean ) =
372372 new Function1 [T , Boolean ] { def apply (result : T ): Boolean = f(result).booleanValue() }
373+ def filterOf [T ](f : pekko.japi.function.Function [T , java.lang.Boolean ]): (T => Boolean ) =
374+ new Function1 [T , Boolean ] { def apply (result : T ): Boolean = f(result).booleanValue() }
373375}
374376
375377/**
You can’t perform that action at this time.
0 commit comments