=jdk9,str JDK9 ready classes, in special directories (#23650)
* =jdk9,str JDK9 ready classes, in special directories * =str,jdk9 prepare for releasing using JDK9 (needs sbt 1.0+ though) * =str,jdk9 passing TCK spec touching some JDK9 types internally * make sure to include linting options
This commit is contained in:
parent
9bd6ca4c8b
commit
349a5f749a
7 changed files with 623 additions and 0 deletions
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (C) 2017 Lightbend Inc. <http://www.lightbend.com/>
|
||||
*/
|
||||
|
||||
package akka.stream.javadsl;
|
||||
|
||||
import akka.NotUsed;
|
||||
import akka.japi.Pair;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.concurrent.Flow;
|
||||
|
||||
public class JavaFlowSupportCompileTest {
|
||||
@Test
|
||||
public void shouldCompile() throws Exception {
|
||||
final Flow.Processor<String,String> processor = new Flow.Processor<String, String>() {
|
||||
@Override
|
||||
public void subscribe(Flow.Subscriber<? super String> subscriber) {}
|
||||
@Override
|
||||
public void onSubscribe(Flow.Subscription subscription) {}
|
||||
@Override
|
||||
public void onNext(String item) {}
|
||||
@Override
|
||||
public void onError(Throwable throwable) {}
|
||||
@Override
|
||||
public void onComplete() {}
|
||||
};
|
||||
|
||||
|
||||
final Source<String, Flow.Subscriber<String>> stringSubscriberSource =
|
||||
JavaFlowSupport.Source.asSubscriber();
|
||||
final Source<String, NotUsed> stringNotUsedSource =
|
||||
JavaFlowSupport.Source.fromPublisher(processor);
|
||||
|
||||
final akka.stream.javadsl.Flow<String, String, NotUsed> stringStringNotUsedFlow =
|
||||
JavaFlowSupport.Flow.fromProcessor(() -> processor);
|
||||
final akka.stream.javadsl.Flow<String, String, NotUsed> stringStringNotUsedFlow1 =
|
||||
JavaFlowSupport.Flow.fromProcessorMat(() -> Pair.apply(processor, NotUsed.getInstance()));
|
||||
|
||||
final Sink<String, Flow.Publisher<String>> stringPublisherSink =
|
||||
JavaFlowSupport.Sink.asPublisher(AsPublisher.WITH_FANOUT);
|
||||
final Sink<String, NotUsed> stringNotUsedSink =
|
||||
JavaFlowSupport.Sink.fromSubscriber(processor);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue