Skip to content

Commit 74dba82

Browse files
committed
chore: dependency-graph: ignore more contexts
follow-up on apache#1392
1 parent e779b7b commit 74dba82

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.github/workflows/dependency-graph.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ jobs:
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

actor-tests/src/test/java/org/apache/pekko/dispatch/JavaFutureTests.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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 {

actor/src/main/scala/org/apache/pekko/dispatch/Future.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,8 @@ abstract class Recover[+T] extends japi.RecoverBridge[T] {
370370
object 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
/**

0 commit comments

Comments
 (0)