#19441: Use Optional instead of Option in javadsl

This commit is contained in:
Endre Sándor Varga 2016-01-14 16:20:39 +01:00
parent ecc916abfd
commit 7a39063f2e
7 changed files with 48 additions and 68 deletions

View file

@ -28,6 +28,7 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import java.nio.charset.Charset;
@ -148,7 +149,7 @@ public class MigrationsJava {
}
//#source-creators
Source<Integer, Promise<Option<Integer>>> src = Source.<Integer>maybe();
Source<Integer, Promise<Optional<Integer>>> src = Source.<Integer>maybe();
// Complete the promise with an empty option to emulate the old lazyEmpty
promise.trySuccess(scala.Option.empty());