make it compile in SBT & Eclipse with 2.9.2-SNAPSHOT
- there is one remaining bug, which makes it impossible to implement Function1[T, Boolean] from Java (I wonder if this will ever work, given that there is no equivalent type expressible in Java) - hence create Function1 in Scala code, Java only prepares a Filter SAM which does not inherit from anything - ugly (one more alloc) but the only way I see right now.
This commit is contained in:
parent
74a36e5ddb
commit
0cb2184904
4 changed files with 15 additions and 18 deletions
|
|
@ -148,12 +148,12 @@ public class JavaFutureTests {
|
|||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
Promise<String> cf = Futures.promise(system.dispatcher());
|
||||
Future<String> f = cf;
|
||||
Future<String> r = f.filter(new Filter<String>() {
|
||||
Future<String> r = f.filter(Filter.create(new Filter<String>() {
|
||||
public boolean filter(String r) {
|
||||
latch.countDown();
|
||||
return r.equals("foo");
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
cf.success("foo");
|
||||
assertTrue(latch.await(5000, TimeUnit.MILLISECONDS));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue